Go to the documentation of this file.
31 #include "vendor/encoding.h"
37 extern volatile int fe310_in_isr;
42 static inline __attribute__((always_inline))
unsigned int irq_enable(
void)
47 "csrrs %[dest], mstatus, %[mask]"
49 : [mask]
"i"(MSTATUS_MIE)
58 static inline __attribute__((always_inline))
unsigned int irq_disable(
void)
63 "csrrc %[dest], mstatus, %[mask]"
65 : [mask]
"i"(MSTATUS_MIE)
75 static inline __attribute__((always_inline))
void irq_restore(
unsigned int state)
79 "csrw mstatus, %[state]"
89 static inline __attribute__((always_inline))
int irq_is_in(
void)
static void irq_restore(unsigned int state)
Restore the state of the IRQ flags.
static unsigned int irq_disable(void)
Disable all maskable interrupts.
static unsigned int irq_enable(void)
Enable all maskable interrupts.
static int irq_is_in(void)
See if the current context is inside an ISR.
CPU specific configuration options.