Loading...
Searching...
No Matches
irq_arch.h File Reference

Implementation of the kernels irq interface. More...

Detailed Description

Implementation of the kernels irq interface.

Author
Ken Rabold
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file irq_arch.h.

#include <stdint.h>
#include "irq.h"
#include "vendor/riscv_csr.h"
+ Include dependency graph for irq_arch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define CPU_CSR_MCAUSE_CAUSE_MSK   (0x0fffu)
 Bit mask for the MCAUSE register.
 
volatile int riscv_in_isr
 
static unsigned int irq_enable (void)
 Enable all maskable interrupts.
 
static unsigned int irq_disable (void)
 Disable all maskable interrupts.
 
static void irq_restore (unsigned int state)
 Restore the state of the IRQ flags.
 
static bool irq_is_in (void)
 See if the current context is inside an ISR.
 
static bool irq_is_enabled (void)
 

Macro Definition Documentation

◆ CPU_CSR_MCAUSE_CAUSE_MSK

#define CPU_CSR_MCAUSE_CAUSE_MSK   (0x0fffu)

Bit mask for the MCAUSE register.

Definition at line 38 of file irq_arch.h.

Function Documentation

◆ irq_disable()

static unsigned int irq_disable ( void  )
inlinestatic

Disable all maskable interrupts.

Definition at line 62 of file irq_arch.h.

◆ irq_enable()

static unsigned int irq_enable ( void  )
inlinestatic

Enable all maskable interrupts.

Definition at line 45 of file irq_arch.h.

◆ irq_is_enabled()

static bool irq_is_enabled ( void  )
inlinestatic

Definition at line 100 of file irq_arch.h.

◆ irq_is_in()

static bool irq_is_in ( void  )
inlinestatic

See if the current context is inside an ISR.

Definition at line 95 of file irq_arch.h.

◆ irq_restore()

static void irq_restore ( unsigned int  state)
inlinestatic

Restore the state of the IRQ flags.

Definition at line 80 of file irq_arch.h.