generic
[Interrupt handling and dispatching]


Files

file  interrupt.h
file  interrupt.c
 Interrupt redirector.

Defines

#define IVT_ITEMS   0
#define IVT_FIRST   0
#define fault_if_from_uspace(istate, cmd,)

Functions

iroutine exc_register (int n, const char *name, iroutine f)
void exc_dispatch (int n, istate_t *t)
void exc_init (void)
 SPINLOCK_INITIALIZE (exctbl_lock)
static void exc_undef (int n, istate_t *istate)
static int exc_print_cmd (cmd_arg_t *argv)

Variables

struct {
 SPINLOCK_DECLARE (lock)
   const char *   name
   iroutine   f
   int   count
   zone_t *   info [ZONES_MAX]
exc_table [IVT_ITEMS]
static cmd_info_t exc_info

Define Documentation

#define fault_if_from_uspace istate,
cmd   ) 
 

Value:

{ \
        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(); \
        } \
}

Definition at line 55 of file interrupt.h.

Referenced by exc_undef().

#define IVT_FIRST   0
 

Definition at line 52 of file interrupt.h.

Referenced by exc_dispatch(), and exc_print_cmd().

#define IVT_ITEMS   0
 

Definition at line 48 of file interrupt.h.

Referenced by exc_dispatch(), exc_init(), exc_print_cmd(), and exc_register().


Function Documentation

void exc_dispatch int  n,
istate_t istate
 

Dispatch exception according to exception table

Called directly from the assembler code. CPU is interrupts_disable()'d.

Definition at line 86 of file interrupt.c.

References ASSERT, exc_table, istate_from_uspace(), IVT_FIRST, IVT_ITEMS, THREAD, and thread_exit().

Referenced by exception_external().

Here is the call graph for this function:

void exc_init void   ) 
 

Initialize generic exception handling support

Definition at line 140 of file interrupt.c.

References cmd_initialize(), cmd_register(), exc_info, exc_register(), exc_undef(), IVT_ITEMS, and panic.

Referenced by main_bsp_separated_stack().

Here is the call graph for this function:

static int exc_print_cmd cmd_arg_t argv  )  [static]
 

kconsole cmd - print all exceptions

Definition at line 104 of file interrupt.c.

References exc_table, f, get_symtab_entry(), getc(), IVT_FIRST, IVT_ITEMS, name, printf(), spinlock_lock, spinlock_unlock(), and stdin.

Here is the call graph for this function:

iroutine exc_register int  n,
const char *  name,
iroutine  f
 

Register exception handler

Parameters:
n Exception number
name Description
f Exception handler

Definition at line 64 of file interrupt.c.

References ASSERT, exc_table, IVT_ITEMS, spinlock_lock, and spinlock_unlock().

Referenced by exc_init(), and interrupt_init().

Here is the call graph for this function:

static void exc_undef int  n,
istate_t istate
[static]
 

Default 'null' exception handler

Definition at line 97 of file interrupt.c.

References fault_if_from_uspace, and panic.

Referenced by exc_init().

SPINLOCK_INITIALIZE exctbl_lock   ) 
 


Variable Documentation

cmd_info_t exc_info [static]
 

Initial value:

 {
        .name = "exc",
        .description = "Print exception table.",
        .func = exc_print_cmd,
        .help = NULL,
        .argc = 0,
        .argv = NULL
}

Definition at line 130 of file interrupt.c.

Referenced by exc_init().

struct { ... } exc_table[IVT_ITEMS] [static]
 

Referenced by exc_dispatch(), exc_print_cmd(), and exc_register().

iroutine f [inherited]
 

Definition at line 53 of file interrupt.c.

const char* name [inherited]
 

Definition at line 52 of file interrupt.c.


Generated on Sun Jun 18 17:26:23 2006 for HelenOS Kernel (ppc32) by  doxygen 1.4.6