KallistiOS git master
Independent SDK for the Sega Dreamcast
|
IRQs and ISRs for the SH4's CPU More...
Topics | |
Context | |
Thread execution state and accessors | |
Control Flow | |
Methods for managing control flow within an irq_handler. | |
Exception type offsets | |
Offsets within exception types | |
Handlers | |
API for managing IRQ handlers | |
Mask | |
Accessors and modifiers of the IMASK state. | |
State | |
Methods for querying active IRQ information. | |
Files | |
file | irq.h |
Interrupt and exception handling. | |
Macros | |
#define | TIMER_IRQ EXC_TMU0_TUNI0 |
The value of the timer IRQ. | |
#define | irq_disable_scoped() |
Disable interrupts with scope management. | |
IRQs and ISRs for the SH4's CPU
This is an API for managing interrupts, their masks, and their handler routines along with thread context information.
#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.
#define TIMER_IRQ EXC_TMU0_TUNI0 |
The value of the timer IRQ.
enum irq_t |
Interrupt exception codes.
Dreamcast-specific exception codes. Used to identify the source or type of an interrupt. Each exception code is of a certain "type" which dictates how the interrupt is generated and handled.
List of exception types:
Type | Description |
---|---|
RESET | Caused by system reset. Uncatchable and fatal. Automatically branch to address 0xA0000000 . |
REEXEC | Restarts current instruction after interrupt processing. Context PC is the triggering instruction. |
POST | Continues with next instruciton after interrupt processing. Context PC is the next instruction. |
SOFT | Software-driven exceptions for triggering interrupts upon special events. |
UNUSED | Known to not be present and usable with the DC's SH4 configuration. |
List of exception codes: