|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Timer functionality. More...
Go to the source code of this file.
Data Structures | |
| struct | irq_cb_t |
| The type of a full callback of an IRQ handler and userdata. More... | |
Macros | |
| #define | irq_disable_scoped() |
| Disable interrupts with scope management. | |
Typedefs | |
| typedef struct irq_context | irq_context_t |
| Architecture-specific structure for holding the processor state. | |
| typedef enum irq_exception | irq_t |
| Architecture-specific interrupt exception codes. | |
| typedef uint32_t | irq_mask_t |
| Type representing an interrupt mask state. | |
| typedef void(* | irq_hdl_t) (irq_t code, irq_context_t *context, void *data) |
| The type of an IRQ handler. | |
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. | |
| 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. | |
| 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. | |
Timer functionality.
This file contains functions for enabling/disabling interrupts, and setting interrupt handlers.
| typedef struct irq_context irq_context_t |
Architecture-specific structure for holding the processor state.
This structure should hold register values and other important parts of the processor state.
| typedef void(* irq_hdl_t) (irq_t code, irq_context_t *context, void *data) |
The type of an IRQ handler.
| code | The IRQ that caused the handler to be called. |
| context | The CPU's context. |
| data | Arbitrary userdata associated with the handler. |
| typedef uint32_t irq_mask_t |
Type representing an interrupt mask state.
| typedef enum irq_exception irq_t |
Architecture-specific interrupt exception codes.
Used to identify the source or type of an interrupt.