|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for handling IRQ state More...
Macros | |
| #define | irq_disable_scoped() |
| Disable interrupts with scope management. | |
Functions | |
| static void | irq_enable (void) |
| Enable all interrupts. | |
| static irq_mask_t | irq_disable (void) |
| Disable interrupts. | |
| static void | irq_restore (irq_mask_t state) |
| Restore interrupt state. | |
| static bool | irq_inside_int (void) |
| Returns whether inside of an interrupt context. | |
API for handling IRQ state
The following functions can be used to disable or enable interrupts, restore a previously saved interrupt state, or query whether or not the calling function is running in an interrupt context.
| #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.
Referenced by do_dma_transfer().
|
inlinestatic |
Disable interrupts.
This function will disable interrupts (not exceptions).
Referenced by draw_sphere(), and g2_lock().
|
inlinestatic |
Enable all interrupts.
This function will enable ALL interrupts, including external ones.
Referenced by draw_sphere().
|
inlinestatic |
Returns whether inside of an interrupt context.
| non-zero | If inside an interrupt handler. |
| 0 | If normal processing is in progress. |
Referenced by spinlock_lock_irqsafe().
|
inlinestatic |
Restore interrupt state.
This function will restore the interrupt state to the value specified. This should correspond to a value returned by irq_disable().
| state | The IRQ state to restore. This should be a value returned by irq_disable(). |
Referenced by g2_unlock().