Changeset eb522e8 in mainline for kernel/generic/src/syscall/syscall.c
- Timestamp:
- 2011-06-01T08:43:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6c1f1
- Parents:
- 9e2e715 (diff), e51a514 (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
-
kernel/generic/src/syscall/syscall.c
r9e2e715 reb522e8 41 41 #include <proc/program.h> 42 42 #include <mm/as.h> 43 #include <mm/page.h> 43 44 #include <print.h> 44 45 #include <arch.h> 45 46 #include <debug.h> 46 47 #include <ddi/device.h> 48 #include <interrupt.h> 47 49 #include <ipc/sysipc.h> 48 50 #include <synch/futex.h> … … 56 58 57 59 /** 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)60 sysarg_t syscall_handler(sysarg_t a1, sysarg_t a2, sysarg_t a3, 61 sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id) 60 62 { 61 63 /* Do userpace accounting */ … … 66 68 #ifdef CONFIG_UDEBUG 67 69 /* 70 * An istate_t-compatible record was created on the stack by the 71 * low-level syscall handler. This is the userspace space state 72 * structure. 73 */ 74 THREAD->udebug.uspace_state = istate_get(THREAD); 75 76 /* 68 77 * Early check for undebugged tasks. We do not lock anything as this 69 78 * test need not be precise in either direction. 70 *71 79 */ 72 80 if (THREAD->udebug.active) … … 74 82 #endif 75 83 76 unative_t rc;84 sysarg_t rc; 77 85 if (id < SYSCALL_END) { 78 86 rc = syscall_table[id](a1, a2, a3, a4, a5, a6); 79 87 } else { 80 88 printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id); 81 task_kill(TASK->taskid); 82 thread_exit(); 89 task_kill_self(true); 83 90 } 84 91 … … 98 105 udebug_stoppable_end(); 99 106 } 107 108 /* Clear userspace state pointer */ 109 THREAD->udebug.uspace_state = NULL; 100 110 #endif 101 111 … … 117 127 (syshandler_t) sys_thread_get_id, 118 128 (syshandler_t) sys_thread_usleep, 129 (syshandler_t) sys_thread_udelay, 119 130 120 131 (syshandler_t) sys_task_get_id, 121 132 (syshandler_t) sys_task_set_name, 133 (syshandler_t) sys_task_kill, 134 (syshandler_t) sys_task_exit, 122 135 (syshandler_t) sys_program_spawn_loader, 123 136 … … 132 145 (syshandler_t) sys_as_area_change_flags, 133 146 (syshandler_t) sys_as_area_destroy, 147 (syshandler_t) sys_as_get_unmapped_area, 148 149 /* Page mapping related syscalls. */ 150 (syshandler_t) sys_page_find_mapping, 134 151 135 152 /* IPC related syscalls. */ … … 145 162 (syshandler_t) sys_ipc_poke, 146 163 (syshandler_t) sys_ipc_hangup, 147 (syshandler_t) sys_ipc_register_irq, 148 (syshandler_t) sys_ipc_unregister_irq, 164 (syshandler_t) sys_ipc_connect_kbox, 149 165 150 166 /* Event notification syscalls. */ 151 167 (syshandler_t) sys_event_subscribe, 168 (syshandler_t) sys_event_unmask, 152 169 153 170 /* Capabilities related syscalls. */ … … 159 176 (syshandler_t) sys_physmem_map, 160 177 (syshandler_t) sys_iospace_enable, 161 (syshandler_t) sys_interrupt_enable, 178 (syshandler_t) sys_register_irq, 179 (syshandler_t) sys_unregister_irq, 162 180 163 181 /* Sysinfo syscalls */ … … 169 187 /* Debug calls */ 170 188 (syshandler_t) sys_debug_enable_console, 171 (syshandler_t) sys_debug_disable_console, 172 173 (syshandler_t) sys_ipc_connect_kbox 189 (syshandler_t) sys_debug_disable_console 174 190 }; 175 191
Note:
See TracChangeset
for help on using the changeset viewer.