|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for handling IRQ contexts More...
Functions | |
| static void | irq_create_context (irq_context_t *context, uintptr_t stack_pointer, uintptr_t routine, const uintptr_t *args) |
| Fill a newly allocated context block. | |
| static void | irq_set_context (irq_context_t *cxt) |
| Switch out contexts (for interrupt return). | |
| static irq_context_t * | irq_get_context (void) |
| Get the current IRQ context. | |
API for handling IRQ contexts
This API provides functions to create a new IRQ context, get a pointer to the current context, or set the context that will be used when returning from an exception.
|
inlinestatic |
Fill a newly allocated context block.
The given parameters will be passed to the called routine (up to the architecture maximum). For the Dreamcast, this maximum is 4.
| context | The IRQ context to fill in. |
| stack_pointer | The value to set in the stack pointer. |
| routine | The address of the program counter for the context. |
| args | Any arguments to set in the registers. This cannot be NULL, and must have enough values to fill in up to the architecture maximum. |
|
inlinestatic |
Get the current IRQ context.
This will fetch the processor context prior to the exception handling during an IRQ service routine.
|
inlinestatic |
Switch out contexts (for interrupt return).
This function will set the processor state that will be restored when the exception returns.
| cxt | The IRQ context to restore. |
References cxt.