Subversion Repositories HelenOS

Rev

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

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