Subversion Repositories HelenOS

Rev

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

Rev 4377 Rev 4692
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
    THREAD->udebug.uspace_state = NULL;
73
        THREAD->udebug.uspace_state = NULL;
65
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
74
        udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
-
 
75
    }
66
#endif
76
#endif
67
   
77
   
68
    if (id < SYSCALL_END) {
78
    if (id < SYSCALL_END) {
69
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
79
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
70
    } else {
80
    } else {
Line 75... Line 85...
75
   
85
   
76
    if (THREAD->interrupted)
86
    if (THREAD->interrupted)
77
        thread_exit();
87
        thread_exit();
78
   
88
   
79
#ifdef CONFIG_UDEBUG
89
#ifdef CONFIG_UDEBUG
-
 
90
    if (debug) {
80
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
91
        udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
81
   
92
   
82
    /*
93
        /*
83
     * Stopping point needed for tasks that only invoke non-blocking
94
         * Stopping point needed for tasks that only invoke
84
     * system calls.
95
         * non-blocking system calls. Not needed if the task
-
 
96
         * is not being debugged (it cannot block here).
85
     */
97
         */
86
    udebug_stoppable_begin();
98
        udebug_stoppable_begin();
87
    udebug_stoppable_end();
99
        udebug_stoppable_end();
-
 
100
    }
88
#endif
101
#endif
89
   
102
   
90
    return rc;
103
    return rc;
91
}
104
}
92
 
105