Changeset 683 for trunk/kernel/syscalls/sys_kill.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_kill.c
r664 r683 2 2 * sys_kill.c - Kernel function implementing the "kill" system call. 3 3 * 4 * Author Alain Greiner (2016,2017,2018)4 * Author Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 67 67 process_t * process = this->process; 68 68 69 #if (DEBUG_SYS_KILL || CONFIG_INSTRUMENTATION_SYSCALLS)69 #if DEBUG_SYS_KILL || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS 70 70 uint64_t tm_start = hal_get_cycles(); 71 71 #endif 72 72 73 73 #if DEBUG_SYS_KILL 74 tm_start = hal_get_cycles();75 74 if( DEBUG_SYS_KILL < tm_start ) 76 75 printk("\n[%s] thread[%x,%x] enter : %s to process %x / cycle %d\n", … … 95 94 96 95 #if DEBUG_SYSCALLS_ERROR 97 printk("\n[ERROR] in %s : process %x not found\n", __FUNCTION__, pid ); 96 if( DEBUG_SYSCALLS_ERROR < tm_start ) 97 printk("\n[ERROR] in %s : thread[%x,%x] / process %x not found\n", 98 __FUNCTION__, process->pid, this->trdid, pid ); 98 99 #endif 99 100 this->errno = EINVAL; … … 175 176 176 177 #if DEBUG_SYSCALLS_ERROR 177 printk("\n[ERROR] in %s : process %x cannot kill itself\n", __FUNCTION__, pid ); 178 if( DEBUG_SYSCALLS_ERROR < tm_start ) 179 printk("\n[ERROR] in %s : thread[%x,%x] / process %x cannot kill itself\n", 180 __FUNCTION__, process->pid, this->trdid, pid ); 178 181 #endif 179 182 this->errno = EINVAL; … … 186 189 187 190 #if DEBUG_SYSCALLS_ERROR 188 printk("\n[ERROR] in %s : process_init cannot be killed\n", __FUNCTION__ ); 191 if( DEBUG_SYSCALLS_ERROR < tm_start ) 192 printk("\n[ERROR] in %s : thread[%x,%x] / process_init cannot be killed\n", 193 __FUNCTION__, process->pid, this->trdid); 189 194 #endif 190 195 this->errno = EINVAL; … … 219 224 220 225 #if DEBUG_SYSCALLS_ERROR 221 printk("\n[ERROR] in %s : illegal signal %d / process %x\n", __FUNCTION__, sig_id, pid ); 226 if( DEBUG_SYSCALLS_ERROR < tm_start ) 227 printk("\n[ERROR] in %s : thread[%x,%x] / illegal signal %d\n", 228 __FUNCTION__, process->pid, this->trdid, sig_id ); 222 229 #endif 223 230 this->errno = EINVAL; … … 234 241 #if DEBUG_SYS_KILL 235 242 if( DEBUG_SYS_KILL < tm_end ) 236 printk("\n[%s] thread[%x,%x] exit / process %x / %s / c ost = %d / cycle %d\n",243 printk("\n[%s] thread[%x,%x] exit / process %x / %s / cycle %d\n", 237 244 __FUNCTION__ , this->process->pid, this->trdid, pid, 238 sig_type_str(sig_id), (uint32_t) (tm_end - tm_start), (uint32_t)tm_end );245 sig_type_str(sig_id), (uint32_t)tm_end ); 239 246 #endif 240 247
Note: See TracChangeset
for help on using the changeset viewer.