Defines.
|
| #define | ALIGNED(alignment) __attribute__((aligned(alignment))) |
| | GCC aligned attribute.
|
| |
| #define | PACKED __attribute__((packed)) |
| | GCC packed attribute.
|
| |
| #define | NORETURN __attribute__((noreturn)) |
| | GCC noreturn function attribute.
|
| |
| #define | NOINLINE __attribute__((noinline)) |
| | GCC noinline function attribute.
|
| |
| #define | CONST_FUNC __attribute__((const)) |
| | GCC const function attribute.
|
| |
| #define | PURE __attribute__((pure)) |
| | GCC.
|
| |
| #define | CONCAT(a, b) CONCAT_INNER(a, b) |
| | Concatenates two tokens.
|
| |
| #define | CONCAT_INNER(a, b) a##b |
| |
| #define | RED_ZONE_SIZE 128 |
| | The size of the red zone in bytes.
|
| |
| #define | UNUSED(x) (void)(x) |
| | Mark a variable as unused.
|
| |
| #define | UNUSED_FUNC __attribute__((unused)) |
| | GCC unused function attribute.
|
| |
| #define | ARRAY_SIZE(x) ((size_t)(sizeof(x) / sizeof((x)[0]))) |
| | Get the number of elements in a static array.
|
| |
| #define | LIKELY(x) __builtin_expect(!!(x), 1) |
| | Mark a condition as likely.
|
| |
| #define | UNLIKELY(x) __builtin_expect(!!(x), 0) |
| | Mark a condition as unlikely.
|
| |
| #define | CONSTRUCTOR(priority) __attribute__((used, constructor(priority))) |
| | GCC constructor function attribute.
|
| |
| #define | DESTRUCTOR(priority) __attribute__((used, destructor(priority))) |
| | GCC destructor function attribute.
|
| |
| #define | ASM(...) __asm__ volatile(__VA_ARGS__) |
| | Inline assembly macro.
|
| |
| #define CONSTRUCTOR |
( |
|
priority | ) |
__attribute__((used, constructor(priority))) |
GCC constructor function attribute.
Will add the function to the .init_array section with the given priority, the function can then be called using INIT_CALL().
Functions with a higher priority number are called last.
- Parameters
-
| priority | The priority of the constructor function. |
Definition at line 141 of file defs.h.
| #define DESTRUCTOR |
( |
|
priority | ) |
__attribute__((used, destructor(priority))) |
GCC destructor function attribute.
Will add the function to the .finit_array section with the given priority, the function can then be called using FINIT_CALL().
Functions with a higher priority number are called last.
- Parameters
-
| priority | The priority of the destructor function. |
Definition at line 153 of file defs.h.