Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

attributes.h File Reference

Defines variants of the __attribute__ macros to provide better portability. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ATTR_always_inline
 triggers inlining even when no optimization is specified
#define ATTR_pure
 compiler hint that the function has no side effects and return value depends only on arguments and non-volatile globals
#define ATTR_const
 like ATTR_pure, compiler hint that the function has no side effects and return value depends only on arguments -- unlike ATTR_pure, cannot access globals or dereference pointer arguments.
#define ATTR_noreturn
 indicates that the function is 'fatal' and will not return; however, can still throw an exception!
#define ATTR_malloc
 compiler hint that a non-NULL pointer return value is guaranteed to be a unique address (e.g. malloc)
#define ATTR_must_check
 indicates that a warning should be given if caller doesn't use the return value, e.g. newly allocated memory regions
#define ATTR_deprecated
 triggers a warning if the function/variable is referenced by any code which is not itself marked with ATTR_deprecated
#define ATTR_used
 forces the code for the function to be emitted even if nothing appears to reference it -- handy when called by inline assembly
#define ATTR_unused
 indicates no warning should be given if the specified value goes unused, e.g. fulfilling an interface which requires superfluous arguments
#define ATTR_packed
 requests that members of a struct or union be layed out a densely as possible to minimize memory usage; applied to enums requests smallest storage type be used
#define ATTR_likely(x)   (x)
 should be passed a value within an 'if' statement to hint that the value is likely to be 'true' (i.e. non-zero)
#define ATTR_unlikely(x)   (x)
 should be passed a value within an 'if' statement to hint that the value is unlikely to be 'true' (i.e. likely to be 'false' or 0)
#define EXPORT_SYMBOL
#define LOCAL_SYMBOL

Detailed Description

Defines variants of the __attribute__ macros to provide better portability.

Author:
Robert Love (Creator), ejt (more version specificity)

Based on code published at http://rlove.org/log/2005102601

Definition in file attributes.h.


Define Documentation

#define ATTR_always_inline

triggers inlining even when no optimization is specified

Definition at line 52 of file attributes.h.

#define ATTR_const

like ATTR_pure, compiler hint that the function has no side effects and return value depends only on arguments -- unlike ATTR_pure, cannot access globals or dereference pointer arguments.

Definition at line 58 of file attributes.h.

#define ATTR_deprecated

triggers a warning if the function/variable is referenced by any code which is not itself marked with ATTR_deprecated

Definition at line 70 of file attributes.h.

#define ATTR_likely (  )     (x)

should be passed a value within an 'if' statement to hint that the value is likely to be 'true' (i.e. non-zero)

Definition at line 82 of file attributes.h.

#define ATTR_malloc

compiler hint that a non-NULL pointer return value is guaranteed to be a unique address (e.g. malloc)

Definition at line 64 of file attributes.h.

#define ATTR_must_check

indicates that a warning should be given if caller doesn't use the return value, e.g. newly allocated memory regions

Definition at line 67 of file attributes.h.

#define ATTR_noreturn

indicates that the function is 'fatal' and will not return; however, can still throw an exception!

Definition at line 61 of file attributes.h.

#define ATTR_packed

requests that members of a struct or union be layed out a densely as possible to minimize memory usage; applied to enums requests smallest storage type be used

Definition at line 79 of file attributes.h.

#define ATTR_pure

compiler hint that the function has no side effects and return value depends only on arguments and non-volatile globals

Definition at line 55 of file attributes.h.

#define ATTR_unlikely (  )     (x)

should be passed a value within an 'if' statement to hint that the value is unlikely to be 'true' (i.e. likely to be 'false' or 0)

Definition at line 85 of file attributes.h.

#define ATTR_unused

indicates no warning should be given if the specified value goes unused, e.g. fulfilling an interface which requires superfluous arguments

Definition at line 76 of file attributes.h.

#define ATTR_used

forces the code for the function to be emitted even if nothing appears to reference it -- handy when called by inline assembly

Definition at line 73 of file attributes.h.

#define EXPORT_SYMBOL

Definition at line 100 of file attributes.h.

#define LOCAL_SYMBOL

Definition at line 101 of file attributes.h.


Tekkotsu v5.1CVS
Generated Mon May 9 04:58:53 2016 by Doxygen 1.6.3