kernel/thread_stack.h: fix Z_THREAD_STACK_SIZE_ADJUST usage coherency
There are legitimate cases where both ARCH_THREAD_STACK_SIZE_ADJUST()
and ARCH_THREAD_STACK_RESERVED() may be defined at the same time.
It is important for the former to be exposed to the later in that case,
so add K_THREAD_STACK_RESERVED to the argument instead of the result.
Similarly for Z_THREAD_STACK_OBJ_ALIGN() which needs the adjusted size
to provide the proper result. That's what K_THREAD_STACK_LEN() does
already anyway, so fold Z_THREAD_STACK_SIZE_ADJUST() into the definition
of Z_THREAD_STACK_OBJ_ALIGN() directly.
Signed-off-by:
Nicolas Pitre <npitre@baylibre.com>
Loading
Please sign in to comment