From: Holger Lubitz Date: Wed, 1 Aug 2007 22:27:54 +0000 (+0200) Subject: define __pure and __const X-Git-Tag: v0.9.3~101^2^2^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd619a1eec451f440c109122cd41790e0a3f70ee;p=thirdparty%2Fipxe.git define __pure and __const --- 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 @@ -279,6 +279,18 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr, /** Apply standard C calling conventions */ #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. *