mirror of https://github.com/ipxe/ipxe.git
define __pure and __const
parent
536ff0262c
commit
e8b8991b84
|
@ -279,6 +279,18 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
|
||||||
/** Apply standard C calling conventions */
|
/** Apply standard C calling conventions */
|
||||||
#define __cdecl __attribute__ (( cdecl , regparm(0) ))
|
#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.
|
* Declare a function as used.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue