|
PatchworkOS
10941b4
A non-POSIX operating system.
|
Defines. More...
Defines.
Macros | |
| #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 |
| Inner helper macro for token concatenation. | |
| #define | RED_ZONE_SIZE 128 |
| The size of the red zone in bytes. | |
| #define | UNUSED(x) (void)(x) |
| Mark a variable as unused. | |
| #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 ALIGNED | ( | alignment | ) | __attribute__((aligned(alignment))) |
| #define PACKED __attribute__((packed)) |
| #define NORETURN __attribute__((noreturn)) |
| #define NOINLINE __attribute__((noinline)) |
| #define CONST_FUNC __attribute__((const)) |
| #define PURE __attribute__((pure)) |
| #define RED_ZONE_SIZE 128 |
The size of the red zone in bytes.
The red zone is a region of memory below the stack pointer that is reserved and should not be modified by interrupt handlers or signal handlers. The compiler uses this area for temporary storage for the purpose of optimization.
| #define LIKELY | ( | x | ) | __builtin_expect(!!(x), 1) |