kernel: move Z_KERNEL_STACK_LEN higher in thread_stack.h

Moves Z_KERNEL_STACK_LEN() higher in the header file so it is
near the other stack size calculation macros. Also, it was
actually declared after it is first used in the header.
So this seems a logical move.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-06-02 14:33:37 -07:00 committed by Kumar Gala
commit a3413a30e3

View file

@ -104,6 +104,9 @@ static inline char *z_stack_ptr_align(char *ptr)
#define Z_KERNEL_STACK_OBJ_ALIGN ARCH_STACK_PTR_ALIGN
#endif
#define Z_KERNEL_STACK_LEN(size) \
ROUND_UP(Z_KERNEL_STACK_SIZE_ADJUST(size), Z_KERNEL_STACK_OBJ_ALIGN)
/**
* @brief Obtain an extern reference to a stack
*
@ -204,9 +207,6 @@ static inline char *z_stack_ptr_align(char *ptr)
Z_KERNEL_STACK_DEFINE_IN(sym, size, __kstackmem)
#endif
#define Z_KERNEL_STACK_LEN(size) \
ROUND_UP(Z_KERNEL_STACK_SIZE_ADJUST(size), Z_KERNEL_STACK_OBJ_ALIGN)
/**
* @def K_KERNEL_STACK_ARRAY_DEFINE
* @brief Define a toplevel array of kernel stack memory regions