Changeset 407 for trunk/kernel/kern/do_syscall.c
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/do_syscall.c
r406 r407 31 31 32 32 ///////////////////////////////////////////////////////////////////////////////////////////// 33 // This ƒonction should never be called... 33 34 ///////////////////////////////////////////////////////////////////////////////////////////// 34 static in line int sys_undefined()35 static int sys_undefined() 35 36 { 36 37 panic("undefined system call"); … … 40 41 ///////////////////////////////////////////////////////////////////////////////////////////// 41 42 // This array of pointers define the kernel functions implementing the syscalls. 42 // It must be kept consistent with the enum in syscalls.h43 // It must be kept consistent with the enum in "shared_syscalls.h" file. 43 44 ///////////////////////////////////////////////////////////////////////////////////////////// 44 45 … … 48 49 { 49 50 sys_thread_exit, // 0 50 sys_ mmap, // 151 sys_thread_yield, // 1 51 52 sys_thread_create, // 2 52 53 sys_thread_join, // 3 53 54 sys_thread_detach, // 4 54 sys_ thread_yield,// 555 sys_undefined, // 5 55 56 sys_sem, // 6 56 57 sys_condvar, // 7 57 58 sys_barrier, // 8 58 59 sys_mutex, // 9 59 sys_thread_sleep, // 10 60 sys_thread_wakeup, // 11 60 61 sys_undefined, // 10 62 sys_munmap, // 11 61 63 sys_open, // 12 62 sys_ creat,// 1364 sys_mmap, // 13 63 65 sys_read, // 14 64 66 sys_write, // 15 … … 67 69 sys_unlink, // 18 68 70 sys_pipe, // 19 71 69 72 sys_chdir, // 20 70 73 sys_mkdir, // 21 … … 74 77 sys_closedir, // 25 75 78 sys_getcwd, // 26 76 sys_ clock, // 2779 sys_undefined, // 27 77 80 sys_alarm, // 28 78 81 sys_rmdir, // 29 82 79 83 sys_utls, // 30 80 84 sys_chmod, // 31 … … 87 91 sys_stat, // 38 88 92 sys_trace, // 39 93 94 sys_get_config, // 40 95 sys_get_core, // 41 96 sys_get_cycle, // 42 97 sys_get_sched, // 43 98 sys_panic, // 44 99 sys_thread_sleep, // 45 100 sys_thread_wakeup, // 46 89 101 }; 90 102 … … 102 114 thread_user_time_update( this ); 103 115 104 // enable IRQs116 // enable interrupts 105 117 hal_enable_irq( NULL ); 106 118 … … 116 128 } 117 129 118 syscall_dmsg("\n[DMSG] %s : pid = %x / trdid = %x / service #%d\n" 119 " arg0 = %x / arg1 = %x / arg2 = %x / arg3 = %x\n", 120 __FUNCTION__ , this->process->pid , this->trdid , service_num , 121 arg0 , arg1 , arg2 , arg3 ); 130 #if( CONFIG_SYSCALL_DEBUG & 0x1) 131 printk("\n[DBG] %s : pid = %x / trdid = %x / service #%d\n" 132 " arg0 = %x / arg1 = %x / arg2 = %x / arg3 = %x\n", 133 __FUNCTION__ , this->process->pid , this->trdid , service_num , arg0 , arg1 , arg2 , arg3 ); 134 #endif 122 135 123 136 // reset errno … … 127 140 error = syscall_tbl[service_num] ( arg0 , arg1 , arg2 , arg3 ); 128 141 129 // handle pending signals for the calling thread 130 thread_signals_handle( this ); 131 132 // disable IRQs 142 // disable interrupt 133 143 hal_disable_irq( NULL ); 134 144
Note: See TracChangeset
for help on using the changeset viewer.