/* * Handler for general protection faults and other bad errors. * Kill the current thread (which caused the fault). */ static void GPF_Handler(struct Interrupt_State *state) { /* Send the thread to the reaper... */ Print("Exception %d received, killing thread %p (pid %d)\n", state->intNum, CURRENT_THREAD, CURRENT_THREAD->pid); Dump_Interrupt_State(state); Exit(-1); /* We will never get here */ KASSERT(false); }
/* * Handler for general protection faults and other bad errors. * Kill the current thread (which caused the fault). */ static void GPF_Handler(struct Interrupt_State *state) { /* Send the thread to the reaper... */ Print("Exception %d received, killing thread %p\n", state->intNum, g_currentThread); Dump_Interrupt_State(state); Exit(-1); /* We will never get here */ KASSERT(false); }
/* * A dummy interrupt handler function. * Ensures that the low-level interrupt code always * has a handler to call. */ static void Dummy_Interrupt_Handler(struct Interrupt_State* state) { Print("*** Unexpected interrupt! ***\n"); Dump_Interrupt_State(state); STOP(); }