kernel: add K_THREAD_STACK_RESERVED
This is used to have each arch canonically state how much room in the stack object is reserved for non-thread use. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
02f64c6846
commit
575abc0150
4 changed files with 36 additions and 8 deletions
|
@ -120,6 +120,16 @@ extern "C" {
|
|||
1 << (31 - __builtin_clz(x) + 1) : \
|
||||
1 << (31 - __builtin_clz(x)))
|
||||
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
/* Guard is 'carved-out' of the thread stack region, and the supervisor
|
||||
* mode stack is allocated elsewhere by gen_priv_stack.py
|
||||
*/
|
||||
#define Z_ARCH_THREAD_STACK_RESERVED 0
|
||||
#else
|
||||
#define Z_ARCH_THREAD_STACK_RESERVED MPU_GUARD_ALIGN_AND_SIZE
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
#define Z_ARCH_THREAD_STACK_DEFINE(sym, size) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue