Zephyr Project API 3.7.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_BYTES(ptr, bytes) ((((uintptr_t)ptr) % bytes) == 0) |
#define | IS_PTR_ALIGNED(ptr, type) IS_PTR_ALIGNED_BYTES(ptr, __alignof(type)) |
#define | LINKER_KEEP(symbol) |
Tag a symbol (e.g. | |
Common toolchain abstraction.
Macros to abstract compiler capabilities (common to all toolchains).
#define ALWAYS_INLINE inline __attribute__((always_inline)) |
#define EXTERN_C extern |
#define IS_PTR_ALIGNED | ( | ptr, | |
type | |||
) | IS_PTR_ALIGNED_BYTES(ptr, __alignof(type)) |
#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 REQUIRES | ( | sym | ) | __asm__ (".set " # sym "_Requires, " # sym "\n\t"); |
#define ZRESTRICT restrict |