Commit e1cde092 authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

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: default avatarDaniel Leung <daniel.leung@intel.com>
parent 244049bd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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