brickOS Kernel Developer v0.9.0
|
Interface: Definitions for persistent data. More...
Go to the source code of this file.
Macros | |
#define | __persistent __attribute__ ((__section__ (".persist"))) |
Define storage persistent across different runs of a program. | |
Interface: Definitions for persistent data.
Definition in file persistent.h.
#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.