next up previous contents index
Next: 10.8.5 base_trap_default_handler: default trap Up: (X86) Base Environment: Trap Previous: 10.8.3 base_trap_inittab: initialization table

10.8.4 base_trap_handlers: Array of handler routines for hardware traps

   

SYNOPSIS

#include <oskit/x86/base_trap.h>

void (*base_trap_handlers [BASE_TRAP_COUNT]) (struct trap_state *ts);

DESCRIPTION

Contains a function pointer for every hardware trap vector. By default, all entries in this table point to base_trap_default_handler, which will simply dump the register state to the console and panic. The client OS can set entries in this table to point to its own trap handler function(s), or to alternative trap handlers supplied by the OSKit, such as the remote GDB debugging trap handler, gdb_trap (see Section 10.17.5).

PARAMETERS

state
A pointer to the trap state structure to dump.

RETURNS

The trap handler returns zero (success) to resume execution, or nonzero (failure) to cause the entrypoint code to dump the register state and panic the kernel.



University of Utah Flux Research Group