diff options
| author | Holger Lubitz | 2007-08-02 00:27:54 +0200 |
|---|---|---|
| committer | Holger Lubitz | 2007-08-02 00:27:54 +0200 |
| commit | cd619a1eec451f440c109122cd41790e0a3f70ee (patch) | |
| tree | 28c889a549ac2bbfbc400b5e1e42fb8361082994 /src/include | |
| parent | stripped down version of string.c containing only the used functions (diff) | |
| download | ipxe-cd619a1eec451f440c109122cd41790e0a3f70ee.tar.gz ipxe-cd619a1eec451f440c109122cd41790e0a3f70ee.tar.xz ipxe-cd619a1eec451f440c109122cd41790e0a3f70ee.zip | |
define __pure and __const
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/compiler.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h index b130f28fd..e79f9fb2d 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -280,6 +280,18 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr, #define __cdecl __attribute__ (( cdecl , regparm(0) )) /** + * Declare a function as pure - i.e. without side effects + */ +#define __pure __attribute__ (( pure )) + +/** + * Declare a function as const - i.e. it does not access global memory + * (including dereferencing pointers passed to it) at all. + * Must also not call any non-const functions. + */ +#define __const __attribute__ (( const )) + +/** * Declare a function as used. * * Necessary only if the function is called only from assembler code. |
