KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
trap.h File Reference


More...

#include <stdint.h>
#include <sys/cdefs.h>

Go to the source code of this file.

Typedefs

typedef uint8_t trapa_t
 Type for a code passed to the TRAPA instruction.
 
typedef void(* trapa_handler) (trapa_t trap, irq_context_t *context, void *data)
 The type of a TRAPA handler.
 

Functions

int trapa_set_handler (trapa_t trap, trapa_handler hnd, void *data)
 Set or remove a handler for a trapa code.
 
trapa_handler trapa_get_handler (trapa_t trap, void **data)
 Get an existing TRAPA handler.
 

Detailed Description


Interrupt and exception handling.

This file contains various definitions and declarations related to handling trap events, as are invoked through the TRAPA instruction.

Author
Falco Girgis
See also
arch/irq.h, dc/asic.h
Todo
  • state management, propagation
  • TRAPA instruction inline ASM
  • document reserved TRAP codes