Subversion Repositories HelenOS

Rev

Rev 2089 | Rev 2441 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2216
Line 46... Line 46...
46
typedef void (* iroutine)(int n, istate_t *istate);
46
typedef void (* iroutine)(int n, istate_t *istate);
47
 
47
 
48
#define fault_if_from_uspace(istate, cmd, ...) \
48
#define fault_if_from_uspace(istate, cmd, ...) \
49
{ \
49
{ \
50
    if (istate_from_uspace(istate)) { \
50
    if (istate_from_uspace(istate)) { \
51
        klog_printf("Task %lld killed due to an exception at %p.", TASK->taskid, istate_get_pc(istate)); \
51
        klog_printf("Task %llu killed due to an exception at %p.", TASK->taskid, istate_get_pc(istate)); \
52
        klog_printf("  " cmd, ##__VA_ARGS__); \
52
        klog_printf("  " cmd, ##__VA_ARGS__); \
53
        task_kill(TASK->taskid); \
53
        task_kill(TASK->taskid); \
54
        thread_exit(); \
54
        thread_exit(); \
55
    } \
55
    } \
56
}
56
}