Changeset 416 for trunk/kernel/syscalls/sys_kill.c
- Timestamp:
- Jan 4, 2018, 10:05:47 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_kill.c
r409 r416 1 1 /* 2 * sys_kill.c - Send a signal to a given process.2 * sys_kill.c - Kernel function implementing the "kill" system call. 3 3 * 4 4 * Author Alain Greiner (2016,2017) … … 29 29 #include <printk.h> 30 30 #include <process.h> 31 #include <s ignal.h>31 #include <shared_syscalls.h> 32 32 #include <cluster.h> 33 33 #include <rpc.h> … … 39 39 uint32_t save_sr; // required to enable IRQs 40 40 41 thread_t * this = CURRENT_THREAD; 42 41 43 #if CONFIG_SYSCALL_DEBUG 42 44 uint64_t tm_start; 43 45 uint64_t tm_end; 44 46 tm_start = hal_get_cycles(); 47 printk("\n[DBG] %s : core[%x,%d] enter / process %x / sig %d / cycle %d\n", 48 __FUNCTION__ , local_cxy , this->core->lid , pid, sig_id, (uint32_t)tm_start ); 45 49 #endif 46 47 thread_t * this = CURRENT_THREAD;48 process_t * process = this->process;49 50 50 51 // get owner process cluster and lpid … … 76 77 if( local_cxy == owner_cxy ) // owner is local 77 78 { 78 process_make_kill( p rocess, sig_id );79 process_make_kill( pid , sig_id ); 79 80 } 80 81 else // owner is remote 81 82 { 82 rpc_process_make_kill_client( owner_cxy , p rocess, sig_id );83 rpc_process_make_kill_client( owner_cxy , pid , sig_id ); 83 84 } 84 85 … … 90 91 #if CONFIG_SYSCALL_DEBUG 91 92 tm_end = hal_get_cycles(); 92 syscall_dmsg("\n[DBG] %s exit : core[%x,%d] / thread %x in process %x / cycle %d\n" 93 "process %x killed / cost = %d\n", 94 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid , 95 tm_start , pid , (uint32_t)(tm_end - tm_start) ); 93 printk("\n[DBG] %s : core[%x,%d] exit / process %x / sig %d / cost = %d\n", 94 __FUNCTION__ , local_cxy , this->core->lid , pid, sig_id, (uint32_t)(tm_end - tm_start) ); 96 95 #endif 97 96
Note: See TracChangeset
for help on using the changeset viewer.