arches: fix z_arch_is_in_isr() defintion
For some reason these were implemented as macros when they should be inline functions. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
f0f700c121
commit
54506b5a9b
6 changed files with 28 additions and 12 deletions
|
@ -66,7 +66,10 @@ static ALWAYS_INLINE int Z_INTERRUPT_CAUSE(void)
|
|||
return irq_num;
|
||||
}
|
||||
|
||||
#define z_arch_is_in_isr z_arc_v2_irq_unit_is_in_isr
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
return z_arc_v2_irq_unit_is_in_isr();
|
||||
}
|
||||
|
||||
extern void z_thread_entry_wrapper(void);
|
||||
extern void z_user_thread_entry_wrapper(void);
|
||||
|
|
|
@ -41,7 +41,10 @@ z_arch_thread_return_value_set(struct k_thread *thread, unsigned int value)
|
|||
FUNC_NORETURN void z_nios2_fatal_error(unsigned int reason,
|
||||
const z_arch_esf_t *esf);
|
||||
|
||||
#define z_arch_is_in_isr() (_kernel.nested != 0U)
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
return _kernel.nested != 0U;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_OFFLOAD
|
||||
void z_irq_do_offload(void);
|
||||
|
|
|
@ -53,7 +53,10 @@ z_arch_thread_return_value_set(struct k_thread *thread, unsigned int value)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define z_arch_is_in_isr() (_kernel.nested != 0U)
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
return _kernel.nested != 0U;
|
||||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
|
|
|
@ -37,7 +37,10 @@ z_arch_thread_return_value_set(struct k_thread *thread, unsigned int value)
|
|||
FUNC_NORETURN void z_riscv_fatal_error(unsigned int reason,
|
||||
const z_arch_esf_t *esf);
|
||||
|
||||
#define z_arch_is_in_isr() (_kernel.nested != 0U)
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
return _kernel.nested != 0U;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_OFFLOAD
|
||||
int z_irq_do_offload(void);
|
||||
|
|
|
@ -12,13 +12,15 @@
|
|||
#include <ia32/kernel_arch_func.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define z_arch_is_in_isr() (z_arch_curr_cpu()->nested != 0U)
|
||||
#else
|
||||
#define z_arch_is_in_isr() (_kernel.nested != 0U)
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
return z_arch_curr_cpu()->nested != 0;
|
||||
#else
|
||||
return _kernel.nested != 0U;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
|
||||
extern K_THREAD_STACK_DEFINE(_interrupt_stack1, CONFIG_ISR_STACK_SIZE);
|
||||
|
|
|
@ -87,8 +87,10 @@ static ALWAYS_INLINE void z_arch_kernel_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define z_arch_is_in_isr() (z_arch_curr_cpu()->nested != 0U)
|
||||
|
||||
static inline bool z_arch_is_in_isr(void)
|
||||
{
|
||||
return z_arch_curr_cpu()->nested != 0U;
|
||||
}
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#endif /* ZEPHYR_ARCH_XTENSA_INCLUDE_KERNEL_ARCH_FUNC_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue