Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/interrupt.h

    r12bf33a r63594c0  
    3737
    3838#include <arch/interrupt.h>
    39 #include <arch/types.h>
     39#include <print.h>
     40#include <typedefs.h>
    4041#include <proc/task.h>
    4142#include <proc/thread.h>
    4243#include <arch.h>
    4344#include <ddi/irq.h>
     45#include <stacktrace.h>
    4446
    45 typedef void (* iroutine)(int n, istate_t *istate);
     47typedef void (* iroutine_t)(unsigned int, istate_t *);
    4648
    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 }
     49typedef struct {
     50        const char *name;
     51        bool hot;
     52        iroutine_t handler;
     53        uint64_t cycles;
     54        uint64_t count;
     55} exc_table_t;
    5756
    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);
     57IRQ_SPINLOCK_EXTERN(exctbl_lock);
     58extern exc_table_t exc_table[];
     59
     60extern void fault_if_from_uspace(istate_t *, const char *, ...)
     61    PRINTF_ATTRIBUTE(2, 3);
     62extern istate_t *istate_get(thread_t *);
     63extern iroutine_t exc_register(unsigned int, const char *, bool, iroutine_t);
     64extern void exc_dispatch(unsigned int, istate_t *);
     65extern void exc_init(void);
     66
     67extern void irq_initialize_arch(irq_t *);
     68
     69extern void istate_decode(istate_t *);
    6170
    6271#endif
Note: See TracChangeset for help on using the changeset viewer.