Changeset cf2af94 in mainline for kernel/generic/src/syscall/syscall.c
- Timestamp:
- 2011-02-09T11:46:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cb15135a
- Parents:
- a49c4002 (diff), 0b37882 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified kernel/generic/src/syscall/syscall.c ¶
ra49c4002 rcf2af94 45 45 #include <debug.h> 46 46 #include <ddi/device.h> 47 #include <interrupt.h> 47 48 #include <ipc/sysipc.h> 48 49 #include <synch/futex.h> … … 56 57 57 58 /** Dispatch system call */ 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 sysarg_t syscall_handler(sysarg_t a1, sysarg_t a2, sysarg_t a3, 60 sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id) 60 61 { 61 62 /* Do userpace accounting */ … … 66 67 #ifdef CONFIG_UDEBUG 67 68 /* 69 * An istate_t-compatible record was created on the stack by the 70 * low-level syscall handler. This is the userspace space state 71 * structure. 72 */ 73 THREAD->udebug.uspace_state = istate_get(THREAD); 74 75 /* 68 76 * Early check for undebugged tasks. We do not lock anything as this 69 77 * test need not be precise in either direction. 70 *71 78 */ 72 79 if (THREAD->udebug.active) … … 74 81 #endif 75 82 76 unative_t rc;83 sysarg_t rc; 77 84 if (id < SYSCALL_END) { 78 85 rc = syscall_table[id](a1, a2, a3, a4, a5, a6); 79 86 } else { 80 87 printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id); 81 task_kill(TASK->taskid); 82 thread_exit(); 88 task_kill_self(true); 83 89 } 84 90 … … 98 104 udebug_stoppable_end(); 99 105 } 106 107 /* Clear userspace state pointer */ 108 THREAD->udebug.uspace_state = NULL; 100 109 #endif 101 110 … … 120 129 (syshandler_t) sys_task_get_id, 121 130 (syshandler_t) sys_task_set_name, 131 (syshandler_t) sys_task_kill, 132 (syshandler_t) sys_task_exit, 122 133 (syshandler_t) sys_program_spawn_loader, 123 134 … … 132 143 (syshandler_t) sys_as_area_change_flags, 133 144 (syshandler_t) sys_as_area_destroy, 145 (syshandler_t) sys_as_get_unmapped_area, 134 146 135 147 /* IPC related syscalls. */ … … 145 157 (syshandler_t) sys_ipc_poke, 146 158 (syshandler_t) sys_ipc_hangup, 147 (syshandler_t) sys_ipc_register_irq, 148 (syshandler_t) sys_ipc_unregister_irq, 159 (syshandler_t) sys_ipc_connect_kbox, 149 160 150 161 /* Event notification syscalls. */ … … 159 170 (syshandler_t) sys_physmem_map, 160 171 (syshandler_t) sys_iospace_enable, 161 (syshandler_t) sys_interrupt_enable, 172 (syshandler_t) sys_register_irq, 173 (syshandler_t) sys_unregister_irq, 162 174 163 175 /* Sysinfo syscalls */ … … 169 181 /* Debug calls */ 170 182 (syshandler_t) sys_debug_enable_console, 171 (syshandler_t) sys_debug_disable_console, 172 173 (syshandler_t) sys_ipc_connect_kbox 183 (syshandler_t) sys_debug_disable_console 174 184 }; 175 185
Note:
See TracChangeset
for help on using the changeset viewer.