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

API for managing IRQ handlers More...

Functions

static int irq_set_handler (irq_t code, irq_hdl_t hnd, void *data)
 Set or remove an IRQ handler.
 
static irq_cb_t irq_get_handler (irq_t code)
 Get the address of the current handler for the IRQ type.
 
static int irq_set_global_handler (irq_hdl_t hnd, void *data)
 Set a global exception handler.
 
static irq_cb_t irq_get_global_handler (void)
 Get the global exception handler.
 

Detailed Description

API for managing IRQ handlers

This API provides a series of methods for registering and retrieving different types of exception handlers.

Function Documentation

◆ irq_get_global_handler()

static irq_cb_t irq_get_global_handler ( void )
inlinestatic

Get the global exception handler.

Returns
The global exception handler and userdata set with irq_set_global_handler(), or NULL if none is set.

◆ irq_get_handler()

static irq_cb_t irq_get_handler ( irq_t code)
inlinestatic

Get the address of the current handler for the IRQ type.

Parameters
codeThe IRQ type to look up.
Returns
The current handler for the IRQ type and its userdata.
See also
irq_set_handler()

◆ irq_set_global_handler()

static int irq_set_global_handler ( irq_hdl_t hnd,
void * data )
inlinestatic

Set a global exception handler.

This function sets a global catch-all filter for all exception types.

Note
The specific handler will still be called for the exception if one is set. If not, setting one of these will stop the unhandled exception error.
Parameters
hndA pointer to the procedure to handle the exception.
dataA pointer that will be passed along to the callback.
Return values
0On success (no error conditions defined).

References data, and hnd().

◆ irq_set_handler()

static int irq_set_handler ( irq_t code,
irq_hdl_t hnd,
void * data )
inlinestatic

Set or remove an IRQ handler.

Passing a NULL value for hnd will remove the current handler, if any.

Parameters
codeThe IRQ type to set the handler for (see irq_t).
hndA pointer to a procedure to handle the exception.
dataA pointer that will be passed along to the callback.
Return values
0On success.
-1If the code is invalid.
See also
irq_get_handler()

References data, and hnd().