32,6 → 32,11 |
#include <arch/interrupt.h> |
#include <typedefs.h> |
#include <arch/types.h> |
#include <proc/task.h> |
#include <proc/thread.h> |
#include <arch.h> |
#include <console/klog.h> |
#include <ipc/irq.h> |
|
#ifndef IVT_ITEMS |
# define IVT_ITEMS 0 |
41,6 → 46,17 |
# define IVT_FIRST 0 |
#endif |
|
#define fault_if_from_uspace(istate, cmd, ...) \ |
{ \ |
if (istate_from_uspace(istate)) { \ |
klog_printf(cmd, ##__VA_ARGS__); \ |
klog_printf("Task %lld got exception at PC:%P. Task killed.", TASK->taskid, istate_get_pc(istate)); \ |
task_kill(TASK->taskid); \ |
thread_exit(); \ |
} \ |
} |
|
|
extern iroutine exc_register(int n, const char *name, iroutine f); |
extern void exc_dispatch(int n, istate_t *t); |
void exc_init(void); |