KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Accessors and modifiers of the IMASK state. More...
Macros | |
#define | irq_disable_scoped() |
Disable interrupts with scope management. | |
Typedefs | |
typedef uint32_t | irq_mask_t |
Type representing an interrupt mask state. | |
Functions | |
irq_mask_t | irq_get_sr (void) |
Get status register contents. | |
irq_mask_t | irq_disable (void) |
Disable interrupts. | |
void | irq_enable (void) |
Enable all interrupts. | |
void | irq_restore (irq_mask_t v) |
Restore IRQ state. | |
Accessors and modifiers of the IMASK state.
This API is provided for managing and querying information regarding the interrupt mask, a series of bitflags representing whether each type of interrupt has been enabled or not.
#define irq_disable_scoped | ( | ) |
Disable interrupts with scope management.
This macro will disable interrupts, similarly to irq_disable(), with the difference that the interrupt state will automatically be restored once the execution exits the functional block in which the macro was called.
typedef uint32_t irq_mask_t |
Type representing an interrupt mask state.
irq_mask_t irq_disable | ( | void | ) |
Disable interrupts.
This function will disable SH4 interrupts, but will leave SH4 general exceptions enabled.
Referenced by g2_lock().
void irq_enable | ( | void | ) |
Enable all interrupts.
This function will enable ALL interrupts, including external ones.
irq_mask_t irq_get_sr | ( | void | ) |
Get status register contents.
Returns the current value of the status register, as irq_disable() does. The function can be found in arch\dreamcast\kernel\entry.s
IMASK
field.Status | register word |
void irq_restore | ( | irq_mask_t | v | ) |
Restore IRQ state.
This function will restore the interrupt state to the value specified. This should correspond to a value returned by irq_disable().
v | The IRQ state to restore. This should be a value returned by irq_disable(). |
Referenced by g2_unlock().