Subversion Repositories HelenOS

Rev

Rev 4296 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4296 Rev 4420
Line 57... Line 57...
57
/** Dispatch system call */
57
/** Dispatch system call */
58
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
58
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
59
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
59
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
60
{
60
{
61
    unative_t rc;
61
    unative_t rc;
62
   
62
 
63
#ifdef CONFIG_UDEBUG
63
#ifdef CONFIG_UDEBUG
-
 
64
    bool debug;
-
 
65
 
-
 
66
    /*
-
 
67
     * Early check for undebugged tasks. We do not lock anything as this
-
 
68
     * test need not be precise in either way.
-
 
69
     */
-
 
70
    debug = THREAD->udebug.active;
-
 
71
   
-
 
72
    if (debug) {
64
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
73
        udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
-
 
74
    }
65
#endif
75
#endif
66
   
76
   
67
    if (id < SYSCALL_END) {
77
    if (id < SYSCALL_END) {
68
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
78
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
69
    } else {
79
    } else {
Line 74... Line 84...
74
   
84
   
75
    if (THREAD->interrupted)
85
    if (THREAD->interrupted)
76
        thread_exit();
86
        thread_exit();
77
   
87
   
78
#ifdef CONFIG_UDEBUG
88
#ifdef CONFIG_UDEBUG
-
 
89
    if (debug) {
79
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
90
        udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
80
   
91
   
81
    /*
92
        /*
82
     * Stopping point needed for tasks that only invoke non-blocking
93
         * Stopping point needed for tasks that only invoke
83
     * system calls.
94
         * non-blocking system calls. Not needed if the task
-
 
95
         * is not being debugged (it cannot block here).
84
     */
96
         */
85
    udebug_stoppable_begin();
97
        udebug_stoppable_begin();
86
    udebug_stoppable_end();
98
        udebug_stoppable_end();
-
 
99
    }
87
#endif
100
#endif
88
   
101
   
89
    return rc;
102
    return rc;
90
}
103
}
91
 
104