Changes in kernel/generic/include/interrupt.h [12bf33a:63594c0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/interrupt.h
r12bf33a r63594c0 37 37 38 38 #include <arch/interrupt.h> 39 #include <arch/types.h> 39 #include <print.h> 40 #include <typedefs.h> 40 41 #include <proc/task.h> 41 42 #include <proc/thread.h> 42 43 #include <arch.h> 43 44 #include <ddi/irq.h> 45 #include <stacktrace.h> 44 46 45 typedef void (* iroutine )(int n, istate_t *istate);47 typedef void (* iroutine_t)(unsigned int, istate_t *); 46 48 47 #define fault_if_from_uspace(istate, fmt, ...) \ 48 { \ 49 if (istate_from_uspace(istate)) { \ 50 task_t *task = TASK; \ 51 printf("Task %s (%" PRIu64 ") killed due to an exception at %p: ", task->name, task->taskid, istate_get_pc(istate)); \ 52 printf(fmt "\n", ##__VA_ARGS__); \ 53 task_kill(task->taskid); \ 54 thread_exit(); \ 55 } \ 56 } 49 typedef struct { 50 const char *name; 51 bool hot; 52 iroutine_t handler; 53 uint64_t cycles; 54 uint64_t count; 55 } exc_table_t; 57 56 58 extern iroutine exc_register(int n, const char *name, iroutine f); 59 extern void exc_dispatch(int n, istate_t *t); 60 void exc_init(void); 57 IRQ_SPINLOCK_EXTERN(exctbl_lock); 58 extern exc_table_t exc_table[]; 59 60 extern void fault_if_from_uspace(istate_t *, const char *, ...) 61 PRINTF_ATTRIBUTE(2, 3); 62 extern istate_t *istate_get(thread_t *); 63 extern iroutine_t exc_register(unsigned int, const char *, bool, iroutine_t); 64 extern void exc_dispatch(unsigned int, istate_t *); 65 extern void exc_init(void); 66 67 extern void irq_initialize_arch(irq_t *); 68 69 extern void istate_decode(istate_t *); 61 70 62 71 #endif
Note:
See TracChangeset
for help on using the changeset viewer.