Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
Common toolchain abstraction. More...
Go to the source code of this file.
Macros | |
#define | EXTERN_C extern |
#define | ZRESTRICT restrict |
#define | REQUIRES(sym) __asm__ (".set " # sym "_Requires, " # sym "\n\t"); |
#define | ALWAYS_INLINE inline __attribute__((always_inline)) |
#define | STRINGIFY(s) Z_STRINGIFY(s) |
#define | IS_PTR_ALIGNED(ptr, type) ((((uintptr_t)ptr) % __alignof(type)) == 0) |
#define | STRUCT_SECTION_ITERABLE(struct_type, name) |
Defines a new iterable section. More... | |
#define | STRUCT_SECTION_ITERABLE_ALTERNATE(out_type, struct_type, name) |
Defines an alternate data type iterable section. More... | |
#define | STRUCT_SECTION_FOREACH(struct_type, iterator) |
Iterate over a specified iterable section. More... | |
#define | STRUCT_SECTION_GET(struct_type, i, dst) |
Get element from section. More... | |
#define | STRUCT_SECTION_COUNT(struct_type, dst) |
Count elements in a section. More... | |
#define | LINKER_KEEP(symbol) |
Tag a symbol (e.g. function) to be kept in the binary even though it is not used. More... | |
#define | LOG2CEIL(x) |
Common toolchain abstraction.
Macros to abstract compiler capabilities (common to all toolchains).
#define ALWAYS_INLINE inline __attribute__((always_inline)) |
#define EXTERN_C extern |
#define LINKER_KEEP | ( | symbol | ) |
Tag a symbol (e.g. function) to be kept in the binary even though it is not used.
It prevents symbol from being removed by the linker garbage collector. It is achieved by adding a pointer to that symbol to the kept memory section.
symbol | Symbol to keep. |
#define LOG2CEIL | ( | x | ) |
#define REQUIRES | ( | sym | ) | __asm__ (".set " # sym "_Requires, " # sym "\n\t"); |
#define ZRESTRICT restrict |