Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

include/persistent.h File Reference

Interface: Definitions for persistent data. More...

Go to the source code of this file.

Defines

#define __persistent   __attribute__ ((__section__ (".persist")))
 Define storage persistent across different runs of a program.


Detailed Description

Interface: Definitions for persistent data.

Author:
Eddie C. Dost <ecd@skynet.be>

Definition in file persistent.h.


Define Documentation

#define __persistent   __attribute__ ((__section__ (".persist")))
 

Define storage persistent across different runs of a program.

This macro is used to mark initialized data (doesn't apply to uninitialized data) as `persistent' data. This data will be saved across different runs of the program.

Usage: You should insert __persistent between the variable name and equal sign followed by value, e.g:

static int counter __persistent = 0; static char data[] __persistent = { 0x32, 0x36, ... };

Definition at line 51 of file persistent.h.


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Mon Feb 16 21:01:55 2004 for brickOS C by doxygen 1.3.5