KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

Accessors and modifiers of the IMASK state. More...

Typedefs

typedef uint32_t irq_mask_t
 Type representing an interrupt mask state.
 

Functions

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.
 

Detailed Description

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.

Typedef Documentation

◆ irq_mask_t

typedef uint32_t irq_mask_t

Type representing an interrupt mask state.

Function Documentation

◆ irq_disable()

irq_mask_t irq_disable ( void )

Disable interrupts.

This function will disable interrupts, but will leave exceptions enabled.

Returns
The state of IRQs before calling the function. This can be used to restore this state later on with irq_restore().
See also
irq_restore(), irq_enable()

Referenced by g2_lock().

◆ irq_enable()

void irq_enable ( void )

Enable all interrupts.

This function will enable ALL interrupts, including external ones.

See also
irq_disable()

◆ irq_restore()

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().

Parameters
vThe IRQ state to restore. This should be a value returned by irq_disable().
See also
irq_disable()

Referenced by g2_unlock().