Subversion Repositories HelenOS

Rev

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

Rev 3210 Rev 3448
Line 51... Line 51...
51
#include <ddi/ddi.h>
51
#include <ddi/ddi.h>
52
#include <security/cap.h>
52
#include <security/cap.h>
53
#include <syscall/copy.h>
53
#include <syscall/copy.h>
54
#include <sysinfo/sysinfo.h>
54
#include <sysinfo/sysinfo.h>
55
#include <console/console.h>
55
#include <console/console.h>
-
 
56
#include <udebug/udebug.h>
56
 
57
 
57
/** Print using kernel facility
58
/** Print using kernel facility
58
 *
59
 *
59
 * Print to kernel log.
60
 * Print to kernel log.
60
 *
61
 *
Line 106... Line 107...
106
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
107
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
107
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
108
    unative_t a4, unative_t a5, unative_t a6, unative_t id)
108
{
109
{
109
    unative_t rc;
110
    unative_t rc;
110
 
111
 
-
 
112
#ifdef CONFIG_UDEBUG
-
 
113
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
-
 
114
#endif
-
 
115
 
111
    if (id < SYSCALL_END)
116
    if (id < SYSCALL_END) {
-
 
117
#ifdef CONFIG_UDEBUG
-
 
118
        udebug_stoppable_begin();
-
 
119
#endif
112
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
120
        rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
113
    else {
121
    } else {
114
        printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
122
        printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
115
        task_kill(TASK->taskid);
123
        task_kill(TASK->taskid);
116
        thread_exit();
124
        thread_exit();
117
    }
125
    }
118
       
126
       
119
    if (THREAD->interrupted)
127
    if (THREAD->interrupted)
120
        thread_exit();
128
        thread_exit();
-
 
129
 
-
 
130
#ifdef CONFIG_UDEBUG
-
 
131
    udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
-
 
132
    udebug_stoppable_end();
-
 
133
#endif
121
   
134
   
122
    return rc;
135
    return rc;
123
}
136
}
124
 
137
 
125
syshandler_t syscall_table[SYSCALL_END] = {
138
syshandler_t syscall_table[SYSCALL_END] = {
Line 171... Line 184...
171
    (syshandler_t) sys_sysinfo_valid,
184
    (syshandler_t) sys_sysinfo_valid,
172
    (syshandler_t) sys_sysinfo_value,
185
    (syshandler_t) sys_sysinfo_value,
173
   
186
   
174
    /* Debug calls */
187
    /* Debug calls */
175
    (syshandler_t) sys_debug_putint,
188
    (syshandler_t) sys_debug_putint,
176
    (syshandler_t) sys_debug_enable_console
189
    (syshandler_t) sys_debug_enable_console,
-
 
190
 
-
 
191
    (syshandler_t) sys_ipc_connect_kbox
177
};
192
};
178
 
193
 
179
/** @}
194
/** @}
180
 */
195
 */