Changeset 443 for trunk/kernel/syscalls/sys_thread_cancel.c
- Timestamp:
- May 16, 2018, 4:15:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_cancel.c
r440 r443 37 37 cxy_t target_cxy; // target thread cluster identifier 38 38 ltid_t target_ltid; // target thread local index 39 xptr_t owner_xp; // extended pointer on owner process 39 40 cxy_t owner_cxy; // process owner cluster identifier 40 xptr_t owner_xp; // extended pointer on owner process41 41 42 42 // get killer thread pointers … … 44 44 process_t * process = this->process; 45 45 pid_t pid = process->pid; 46 47 #if DEBUG_SYS_THREAD_CANCEL 48 uint64_t tm_start; 49 uint64_t tm_end; 50 tm_start = hal_get_cycles(); 51 if( DEBUG_SYS_THREAD_CANCEL < tm_start ) 52 printk("\n[DBG] %s : thread %x enter to kill thread %x in process %x / cycle %d\n", 53 __FUNCTION__, this , trdid , pid , (uint32_t)tm_start ); 54 #endif 46 55 47 56 // get extended pointer on target thread … … 59 68 } 60 69 61 #if DEBUG_SYS_THREAD_CANCEL 62 uint64_t tm_start; 63 uint64_t tm_end; 64 tm_start = hal_get_cycles(); 65 if( DEBUG_SYS_THREAD_CANCEL < tm_start ) 66 printk("\n[DBG] %s : thread %x enter to kill thread %x / cycle %d\n", 67 __FUCTION__, this, GET_PTR( target_xp ), (uint32_t)tm_start ); 68 #endif 69 70 // get process owner cluster identifier 71 owner_cxy = CXY_FROM_PID( pid ); 70 // get process owner cluster 71 owner_xp = process->owner_xp; 72 owner_cxy = GET_CXY( owner_xp ); 72 73 73 74 // get target thread ltid and cluster … … 79 80 if( (target_cxy == owner_cxy) && (target_ltid == 0) ) 80 81 { 81 // get extended pointer on owner cluster82 owner_xp = cluster_get_owner_process_from_pid( pid );83 84 82 // mark for delete all threads but the main 85 83 hal_enable_irq( &save_sr ); … … 107 105 tm_end = hal_get_cycles(); 108 106 if( DEBUG_SYS_THREAD_CANCEL < tm_end ) 109 printk("\n[DBG] %s : thread %x exit after kill thread %x / cycle %d\n",110 __FU CTION__, this, GET_PTR( target_xp ), (uint32_t)tm_end );107 printk("\n[DBG] %s : thread %x exit after kill thread %x in process %x / cycle %d\n", 108 __FUNCTION__, this , trdid , pid , (uint32_t)tm_end ); 111 109 #endif 112 110
Note: See TracChangeset
for help on using the changeset viewer.