Skip to content
Commit 828a56e9 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Carles Cufí
Browse files

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: default avatarStephanos Ioannidis <root@stephanos.io>
parent 7931fffd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment