Subversion Repositories HelenOS

Rev

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

Rev 2813 Rev 2817
Line 95... Line 95...
95
/** Dispatch system call */
95
/** Dispatch system call */
96
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
96
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
97
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
97
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
98
{
98
{
99
    unative_t rc;
99
    unative_t rc;
-
 
100
    istate_t fake_state;
100
 
101
 
101
    if (id < SYSCALL_END) {
102
    if (id < SYSCALL_END) {
-
 
103
        THREAD->uspace_state = &fake_state;
102
        udebug_stoppable_begin();
104
        udebug_stoppable_begin();
103
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
105
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
104
    } else {
106
    } else {
105
        klog_printf("TASK %llu: Unknown syscall id %llx", TASK->taskid,
107
        klog_printf("TASK %llu: Unknown syscall id %llx", TASK->taskid,
106
            id);
108
            id);
Line 111... Line 113...
111
    if (THREAD->interrupted)
113
    if (THREAD->interrupted)
112
        thread_exit();
114
        thread_exit();
113
 
115
 
114
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc);
116
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc);
115
    udebug_stoppable_end();
117
    udebug_stoppable_end();
-
 
118
    THREAD->uspace_state = NULL;
116
   
119
   
117
    return rc;
120
    return rc;
118
}
121
}
119
 
122
 
120
syshandler_t syscall_table[SYSCALL_END] = {
123
syshandler_t syscall_table[SYSCALL_END] = {