|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Interrupt and exception handling. More...
#include <kos/irq.h>#include <stdalign.h>#include <stdbool.h>#include <stdint.h>#include <kos/cdefs.h>Go to the source code of this file.
Data Structures | |
| struct | irq_context_t |
| Architecture-specific structure for holding the processor state. More... | |
Macros | |
| #define | REG_BYTE_CNT 256 |
| The number of bytes required to save thread context. | |
| #define | IRQ_TRAP_CODE(code) |
| #define | IRQ_PRIO_MAX 15 |
| Minimum/maximum values for IRQ priorities. | |
| #define | IRQ_PRIO_MIN 1 |
| #define | IRQ_PRIO_MASKED 0 |
Register Accessors | |
Convenience macros for accessing context registers | |
| #define | CONTEXT_PC(c) |
| Fetch the program counter from an irq_context_t. | |
| #define | CONTEXT_FP(c) |
| Fetch the frame pointer from an irq_context_t. | |
| #define | CONTEXT_SP(c) |
| Fetch the stack pointer from an irq_context_t. | |
| #define | CONTEXT_RET(c) |
| Fetch the return value from an irq_context_t. | |
Functions | |
| static int | arch_irq_inside_int (void) |
| static void | arch_irq_restore (irq_mask_t old) |
| static irq_mask_t | arch_irq_disable (void) |
| static void | arch_irq_enable (void) |
| void | arch_irq_create_context (irq_context_t *context, uintptr_t stack_pointer, uintptr_t routine, const uintptr_t *args) |
| int | arch_irq_set_handler (irq_t code, irq_hdl_t hnd, void *data) |
| irq_cb_t | arch_irq_get_handler (irq_t code) |
| int | arch_irq_set_global_handler (irq_hdl_t hnd, void *data) |
| irq_cb_t | arch_irq_get_global_handler (void) |
| void | arch_irq_set_context (irq_context_t *cxt) |
| irq_context_t * | arch_irq_get_context (void) |
| void | irq_set_priority (irq_src_t src, unsigned int prio) |
| Set the priority of a given IRQ source. | |
| unsigned int | irq_get_priority (irq_src_t src) |
| Get the priority of a given IRQ source. | |
Variables | |
| int | inside_int |
Interrupt and exception handling.
This file contains various definitions and declarations related to handling interrupts and exceptions on the Dreamcast. This level deals with IRQs and exceptions generated on the SH4, versus the asic layer which deals with actually differentiating "external" interrupts.