Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Macros for declaring thread stacks. More...
Go to the source code of this file.
Macros | |
#define | K_KERNEL_STACK_RESERVED ((size_t)0) |
#define | K_KERNEL_STACK_EXTERN(sym) extern k_thread_stack_t sym[] |
Obtain an extern reference to a stack. More... | |
#define | K_KERNEL_STACK_ARRAY_EXTERN(sym, nmemb, size) |
Obtain an extern reference to a stack array. More... | |
#define | K_KERNEL_PINNED_STACK_ARRAY_EXTERN(sym, nmemb, size) |
Obtain an extern reference to a pinned stack array. More... | |
#define | K_KERNEL_STACK_DEFINE(sym, size) Z_KERNEL_STACK_DEFINE_IN(sym, size, __kstackmem) |
Define a toplevel kernel stack memory region. More... | |
#define | K_KERNEL_PINNED_STACK_DEFINE(sym, size) Z_KERNEL_STACK_DEFINE_IN(sym, size, __kstackmem) |
Define a toplevel kernel stack memory region in pinned section. More... | |
#define | K_KERNEL_STACK_ARRAY_DEFINE(sym, nmemb, size) Z_KERNEL_STACK_ARRAY_DEFINE_IN(sym, nmemb, size, __kstackmem) |
Define a toplevel array of kernel stack memory regions. More... | |
#define | K_KERNEL_PINNED_STACK_ARRAY_DEFINE(sym, nmemb, size) Z_KERNEL_STACK_ARRAY_DEFINE_IN(sym, nmemb, size, __kstackmem) |
Define a toplevel array of kernel stack memory regions in pinned section. More... | |
#define | K_KERNEL_STACK_MEMBER(sym, size) Z_KERNEL_STACK_DEFINE_IN(sym, size,) |
Declare an embedded stack memory region. More... | |
#define | K_KERNEL_STACK_SIZEOF(sym) (sizeof(sym) - K_KERNEL_STACK_RESERVED) |
#define | K_THREAD_STACK_RESERVED ((size_t)0U) |
Indicate how much additional memory is reserved for stack objects. More... | |
#define | K_THREAD_STACK_EXTERN(sym) extern k_thread_stack_t sym[] |
Obtain an extern reference to a stack. More... | |
#define | K_THREAD_STACK_ARRAY_EXTERN(sym, nmemb, size) |
Obtain an extern reference to a thread stack array. More... | |
#define | K_THREAD_STACK_SIZEOF(sym) (sizeof(sym) - K_THREAD_STACK_RESERVED) |
Return the size in bytes of a stack memory region. More... | |
#define | K_THREAD_STACK_DEFINE(sym, size) Z_THREAD_STACK_DEFINE_IN(sym, size, __stackmem) |
Declare a toplevel thread stack memory region. More... | |
#define | K_THREAD_PINNED_STACK_DEFINE(sym, size) K_THREAD_STACK_DEFINE(sym, size) |
Define a toplevel thread stack memory region in pinned section. More... | |
#define | K_THREAD_STACK_LEN(size) |
Calculate size of stacks to be allocated in a stack array. More... | |
#define | K_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) Z_THREAD_STACK_ARRAY_DEFINE_IN(sym, nmemb, size, __stackmem) |
Declare a toplevel array of thread stack memory regions. More... | |
#define | K_THREAD_PINNED_STACK_ARRAY_DEFINE(sym, nmemb, size) K_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) |
Declare a toplevel array of thread stack memory regions in pinned section. More... | |
#define | K_THREAD_STACK_MEMBER(sym, size) Z_THREAD_STACK_DEFINE_IN(sym, size,) |
Declare an embedded stack memory region. More... | |
Macros for declaring thread stacks.
#define K_KERNEL_STACK_EXTERN | ( | sym | ) | extern k_thread_stack_t sym[] |
Obtain an extern reference to a stack.
This macro properly brings the symbol of a thread stack declared elsewhere into scope.
sym | Thread stack symbol name |
#define K_KERNEL_STACK_RESERVED ((size_t)0) |
#define K_THREAD_STACK_ARRAY_EXTERN | ( | sym, | |
nmemb, | |||
size | |||
) |
Obtain an extern reference to a thread stack array.
This macro properly brings the symbol of a stack array declared elsewhere into scope.
sym | Thread stack symbol name |
nmemb | Number of stacks to declare |
size | Size of the stack memory region |
#define K_THREAD_STACK_EXTERN | ( | sym | ) | extern k_thread_stack_t sym[] |
Obtain an extern reference to a stack.
This macro properly brings the symbol of a thread stack declared elsewhere into scope.
sym | Thread stack symbol name |
#define K_THREAD_STACK_RESERVED ((size_t)0U) |
Indicate how much additional memory is reserved for stack objects.
Any given stack declaration may have additional memory in it for guard areas, supervisor mode stacks, or platform-specific data. This macro indicates how much space is reserved for this.
This value only indicates memory that is permanently reserved in the stack object. Memory that is "borrowed" from the thread's stack buffer is never accounted for here.
Reserved memory is at the beginning of the stack object. The reserved area must be appropriately sized such that the stack buffer immediately following it is correctly aligned.