kernel: thread_stack: Add K_THREAD_STACK_DECLARE and its friends
This commit adds the following new thread stack declaration macros that
replace the now-deprecated thread stack "extern" macros:
K_KERNEL_STACK_DECLARE
* replaces K_KERNEL_STACK_EXTERN.
* accepts a stack size parameter.
K_KERNEL_STACK_ARRAY_DECLARE.
* replaces K_KERNEL_STACK_ARRAY_EXTERN.
K_KERNEL_PINNED_STACK_ARRAY_DECLARE.
* replaces K_KERNEL_PINNED_STACK_ARRAY_EXTERN.
K_THREAD_STACK_DECLARE
* replaces K_THREAD_STACK_EXTERN.
* accepts a stack size parameter.
K_THREAD_STACK_ARRAY_DECLARE
* replaces K_THREAD_STACK_ARRAY_EXTERN.
The term "declare" has been chosen in place of "extern" in order to
align with the existing terminology used throughout the kernel code.
Note that the K_{KERNEL,THREAD}_STACK_DECLARE macro accepts a new stack
size parameter so that the `sizeof` operator can be used with the
external stack symbols declared using it.
Signed-off-by:
Stephanos Ioannidis <root@stephanos.io>
Loading
Please sign in to comment