From c968422a78cbc91dfb55a09941894b5ac169fec8 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Thu, 3 Oct 2019 14:50:46 -0700 Subject: [PATCH] xtensa: fix z_arch_switch() This was in the wrong header and declared as a macro instead of an inline function. Signed-off-by: Andrew Boie --- arch/xtensa/include/kernel_arch_data.h | 3 --- arch/xtensa/include/kernel_arch_func.h | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/xtensa/include/kernel_arch_data.h b/arch/xtensa/include/kernel_arch_data.h index 248494f444c..e0de40e2f4b 100644 --- a/arch/xtensa/include/kernel_arch_data.h +++ b/arch/xtensa/include/kernel_arch_data.h @@ -51,9 +51,6 @@ extern "C" { typedef struct __esf __esf_t; -void xtensa_switch(void *switch_to, void **switched_from); -#define z_arch_switch xtensa_switch - #ifdef __cplusplus } #endif diff --git a/arch/xtensa/include/kernel_arch_func.h b/arch/xtensa/include/kernel_arch_func.h index 6c2e83d2810..2066220c45d 100644 --- a/arch/xtensa/include/kernel_arch_func.h +++ b/arch/xtensa/include/kernel_arch_func.h @@ -83,6 +83,13 @@ static ALWAYS_INLINE void z_arch_kernel_init(void) #endif } +void xtensa_switch(void *switch_to, void **switched_from); + +static inline void z_arch_switch(void *switch_to, void **switched_from) +{ + return xtensa_switch(switch_to, switched_from); +} + #ifdef __cplusplus } #endif