16#ifndef ZEPHYR_INCLUDE_ARCH_RX_ARCH_H_
17#define ZEPHYR_INCLUDE_ARCH_RX_ARCH_H_
35#define ARCH_STACK_PTR_ALIGN 4
43#define REG(addr) *((uint8_t *)(addr))
46void z_irq_spurious(
const void *unused);
58#define ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
60 Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
61 z_irq_priority_set(irq_p, priority_p, flags_p); \
65#define ARCH_ISR_DIRECT_HEADER() \
67 _kernel.cpus[0].nested++; \
68 sys_trace_isr_enter(); \
71#define ARCH_ISR_DIRECT_HEADER() \
73 _kernel.cpus[0].nested++; \
78#define ARCH_ISR_DIRECT_FOOTER(check_reschedule) \
80 if (IS_ENABLED(CONFIG_STACK_SENTINEL)) { \
81 z_check_stack_sentinel(); \
83 sys_trace_isr_exit(); \
85 if (check_reschedule && _kernel.cpus[0].nested == 1) { \
86 if (_kernel.cpus->current->base.prio >= 0 || \
87 CONFIG_NUM_METAIRQ_PRIORITIES > 0) { \
88 if (_kernel.ready_q.cache != _kernel.cpus->current) { \
93 _kernel.cpus[0].nested--; \
96#define ARCH_ISR_DIRECT_FOOTER(check_reschedule) \
98 if (IS_ENABLED(CONFIG_STACK_SENTINEL)) { \
99 z_check_stack_sentinel(); \
102 if (check_reschedule && _kernel.cpus[0].nested == 1) { \
103 if (_kernel.cpus->current->base.prio >= 0 || \
104 CONFIG_NUM_METAIRQ_PRIORITIES > 0) { \
105 if (_kernel.ready_q.cache != _kernel.cpus->current) { \
110 _kernel.cpus[0].nested--; \
118 __asm__
volatile(
"MVFC psw, %0\n"
128 return key &
BIT(16);
135 __asm__
volatile(
"SETPSW i" :::
"cc");
146 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:72
static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
Definition arch.h:83
static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key)
Definition arch.h:96
flags
Definition parser.h:97
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition arch.h:144
Renesas RX public kernel miscellaneous.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Software-managed ISR table.