Changeset 874621f in mainline for generic/include/interrupt.h


Ignore:
Timestamp:
2006-06-06T07:40:51Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dbc4e7
Parents:
6f9a9bc
Message:

Added kernel circular buffer klog.
Added automatic killing of tasks raising inappropriate exceptions.
TODO Fix vsnprintf return value(and behaviour according to specs) and remove workaround in klog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/include/interrupt.h

    r6f9a9bc r874621f  
    3333#include <typedefs.h>
    3434#include <arch/types.h>
     35#include <proc/task.h>
     36#include <proc/thread.h>
     37#include <arch.h>
     38#include <console/klog.h>
     39#include <ipc/irq.h>
    3540
    3641#ifndef IVT_ITEMS
     
    4247#endif
    4348
     49#define fault_if_from_uspace(istate, cmd, ...) \
     50{ \
     51        if (istate_from_uspace(istate)) { \
     52                klog_printf(cmd, ##__VA_ARGS__); \
     53                klog_printf("Task %lld got exception at PC:%P. Task killed.", TASK->taskid, istate_get_pc(istate)); \
     54                task_kill(TASK->taskid); \
     55                thread_exit(); \
     56        } \
     57}
     58
     59
    4460extern iroutine exc_register(int n, const char *name, iroutine f);
    4561extern void exc_dispatch(int n, istate_t *t);
Note: See TracChangeset for help on using the changeset viewer.