From 33f87408c4c44fcd285b9cef552fa133e2021959 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 16 Jun 2022 20:44:46 +0900 Subject: [PATCH] global: Correct extern K_KERNEL_STACK_ARRAY_DEFINE usage This commit corrects all `extern K_KERNEL_STACK_ARRAY_DEFINE` macro usages to use the `K_KERNEL_STACK_ARRAY_DECLARE` macro instead. Signed-off-by: Stephanos Ioannidis --- arch/xtensa/include/kernel_arch_func.h | 4 ++-- subsys/debug/thread_analyzer.c | 4 ++-- subsys/shell/modules/kernel_service.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/xtensa/include/kernel_arch_func.h b/arch/xtensa/include/kernel_arch_func.h index a87508579ea..26b258da0eb 100644 --- a/arch/xtensa/include/kernel_arch_func.h +++ b/arch/xtensa/include/kernel_arch_func.h @@ -22,8 +22,8 @@ extern "C" { extern void z_xtensa_fatal_error(unsigned int reason, const z_arch_esf_t *esf); -extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, - CONFIG_ISR_STACK_SIZE); +K_KERNEL_STACK_ARRAY_DECLARE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, + CONFIG_ISR_STACK_SIZE); static ALWAYS_INLINE void arch_kernel_init(void) { diff --git a/subsys/debug/thread_analyzer.c b/subsys/debug/thread_analyzer.c index 2642ddad521..286bf3205b9 100644 --- a/subsys/debug/thread_analyzer.c +++ b/subsys/debug/thread_analyzer.c @@ -126,8 +126,8 @@ static void thread_analyze_cb(const struct k_thread *cthread, void *user_data) cb(&info); } -extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, - CONFIG_ISR_STACK_SIZE); +K_KERNEL_STACK_ARRAY_DECLARE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, + CONFIG_ISR_STACK_SIZE); static void isr_stacks(void) { diff --git a/subsys/shell/modules/kernel_service.c b/subsys/shell/modules/kernel_service.c index e34cbe4d720..9c5276d5e1d 100644 --- a/subsys/shell/modules/kernel_service.c +++ b/subsys/shell/modules/kernel_service.c @@ -184,8 +184,8 @@ static void shell_stack_dump(const struct k_thread *thread, void *user_data) size, unused, size - unused, size, pcnt); } -extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, - CONFIG_ISR_STACK_SIZE); +K_KERNEL_STACK_ARRAY_DECLARE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, + CONFIG_ISR_STACK_SIZE); static int cmd_kernel_stacks(const struct shell *shell, size_t argc, char **argv)