Skip to content

Commit

Permalink
kernel: remove deprecated STACK EXTERN macros
Browse files Browse the repository at this point in the history
These macros have been deprecated since v3.2.0. So remove them.

() K_KERNEL_STACK_EXTERN
   Use K_KERNEL_STACK_DECLARE instead.

() K_KERNEL_STACK_ARRAY_EXTERN
   Use K_KERNEL_STACK_ARRAY_DECLARE instead.

() K_KERNEL_PINNED_STACK_ARRAY_EXTERN
   Use K_KERNEL_PINNED_STACK_ARRAY_DECLARE instead.

() K_THREAD_STACK_EXTERN
   Use K_THREAD_STACK_DECLARE instead.

() K_THREAD_STACK_ARRAY_EXTERN
   Use K_THREAD_STACK_ARRAY_DECLARE instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
  • Loading branch information
dcpleung committed Oct 10, 2023
1 parent 13e0abf commit 8c87dc0
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions include/zephyr/kernel/thread_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,51 +153,6 @@ static inline char *z_stack_ptr_align(char *ptr)
extern struct z_thread_stack_element \
sym[nmemb][Z_KERNEL_STACK_LEN(size)]

/**
* @brief Obtain an extern reference to a stack
*
* This macro properly brings the symbol of a thread stack defined
* elsewhere into scope.
*
* @deprecated Use @c K_KERNEL_STACK_DECLARE() instead.
*
* @param sym Thread stack symbol name
*/
#define K_KERNEL_STACK_EXTERN(sym) __DEPRECATED_MACRO \
extern k_thread_stack_t sym[]

/**
* @brief Obtain an extern reference to a stack array
*
* This macro properly brings the symbol of a stack array defined
* elsewhere into scope.
*
* @deprecated Use @c K_KERNEL_STACK_ARRAY_DECLARE() instead.
*
* @param sym Thread stack symbol name
* @param nmemb Number of stacks defined
* @param size Size of the stack memory region
*/
#define K_KERNEL_STACK_ARRAY_EXTERN(sym, nmemb, size) __DEPRECATED_MACRO \
extern struct z_thread_stack_element \
sym[nmemb][Z_KERNEL_STACK_LEN(size)]

/**
* @brief Obtain an extern reference to a pinned stack array
*
* This macro properly brings the symbol of a pinned stack array
* defined elsewhere into scope.
*
* @deprecated Use @c K_KERNEL_PINNED_STACK_ARRAY_DECLARE() instead.
*
* @param sym Thread stack symbol name
* @param nmemb Number of stacks defined
* @param size Size of the stack memory region
*/
#define K_KERNEL_PINNED_STACK_ARRAY_EXTERN(sym, nmemb, size) __DEPRECATED_MACRO \
extern struct z_thread_stack_element \
sym[nmemb][Z_KERNEL_STACK_LEN(size)]

/**
* @brief Define a toplevel kernel stack memory region in specified section
*
Expand Down Expand Up @@ -342,8 +297,6 @@ static inline char *Z_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
#define Z_THREAD_STACK_BUFFER Z_KERNEL_STACK_BUFFER
#define K_THREAD_STACK_DECLARE K_KERNEL_STACK_DECLARE
#define K_THREAD_STACK_ARRAY_DECLARE K_KERNEL_STACK_ARRAY_DECLARE
#define K_THREAD_STACK_EXTERN K_KERNEL_STACK_EXTERN
#define K_THREAD_STACK_ARRAY_EXTERN K_KERNEL_STACK_ARRAY_EXTERN
#define K_THREAD_PINNED_STACK_DEFINE K_KERNEL_PINNED_STACK_DEFINE
#define K_THREAD_PINNED_STACK_ARRAY_DEFINE \
K_KERNEL_PINNED_STACK_ARRAY_DEFINE
Expand Down Expand Up @@ -467,35 +420,6 @@ static inline char *Z_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
extern struct z_thread_stack_element \
sym[nmemb][K_THREAD_STACK_LEN(size)]

/**
* @brief Obtain an extern reference to a stack
*
* This macro properly brings the symbol of a thread stack defined
* elsewhere into scope.
*
* @deprecated Use @c K_THREAD_STACK_DECLARE() instead.
*
* @param sym Thread stack symbol name
*/
#define K_THREAD_STACK_EXTERN(sym) __DEPRECATED_MACRO \
extern k_thread_stack_t sym[]

/**
* @brief Obtain an extern reference to a thread stack array
*
* This macro properly brings the symbol of a stack array defined
* elsewhere into scope.
*
* @deprecated Use @c K_THREAD_STACK_ARRAY_DECLARE() instead.
*
* @param sym Thread stack symbol name
* @param nmemb Number of stacks defined
* @param size Size of the stack memory region
*/
#define K_THREAD_STACK_ARRAY_EXTERN(sym, nmemb, size) __DEPRECATED_MACRO \
extern struct z_thread_stack_element \
sym[nmemb][K_THREAD_STACK_LEN(size)]

/**
* @brief Return the size in bytes of a stack memory region
*
Expand Down

0 comments on commit 8c87dc0

Please sign in to comment.