7#ifndef ZEPHYR_INCLUDE_ARCH_RX_ARCH_H_
8#define ZEPHYR_INCLUDE_ARCH_RX_ARCH_H_
26#define ARCH_STACK_PTR_ALIGN 4
34#define REG(addr) *((uint8_t *)(addr))
37void z_irq_spurious(
const void *unused);
49#define ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
51 Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
52 z_irq_priority_set(irq_p, priority_p, flags_p); \
56#define ARCH_ISR_DIRECT_HEADER() \
58 _kernel.cpus[0].nested++; \
59 sys_trace_isr_enter(); \
62#define ARCH_ISR_DIRECT_HEADER() \
64 _kernel.cpus[0].nested++; \
69#define ARCH_ISR_DIRECT_FOOTER(check_reschedule) \
71 if (IS_ENABLED(CONFIG_STACK_SENTINEL)) { \
72 z_check_stack_sentinel(); \
74 sys_trace_isr_exit(); \
76 if (check_reschedule && _kernel.cpus[0].nested == 1) { \
77 if (_kernel.cpus->current->base.prio >= 0 || \
78 CONFIG_NUM_METAIRQ_PRIORITIES > 0) { \
79 if (_kernel.ready_q.cache != _kernel.cpus->current) { \
84 _kernel.cpus[0].nested--; \
87#define ARCH_ISR_DIRECT_FOOTER(check_reschedule) \
89 if (IS_ENABLED(CONFIG_STACK_SENTINEL)) { \
90 z_check_stack_sentinel(); \
93 if (check_reschedule && _kernel.cpus[0].nested == 1) { \
94 if (_kernel.cpus->current->base.prio >= 0 || \
95 CONFIG_NUM_METAIRQ_PRIORITIES > 0) { \
96 if (_kernel.ready_q.cache != _kernel.cpus->current) { \
101 _kernel.cpus[0].nested--; \
109 __asm__
volatile(
"MVFC psw, %0\n"
119 return key &
BIT(16);
126 __asm__
volatile(
"SETPSW i" :::
"cc");
137 return &_kernel.cpus[0];
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
Public interface for configuring interrupts.
static ALWAYS_INLINE unsigned int arch_irq_lock(void)
Definition arch.h:63
static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
Definition arch.h:74
static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key)
Definition arch.h:87
flags
Definition parser.h:97
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition arch.h:135
Renesas RX public kernel miscellaneous.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Software-managed ISR table.