Changeset 436 for trunk/kernel/syscalls/sys_thread_wakeup.c
- Timestamp:
- Mar 7, 2018, 9:02:03 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_wakeup.c
r23 r436 34 34 process_t * process = this->process; 35 35 36 #if CONFIG_DEBUG_SYS_THREAD_WAKEUP 37 uint64_t tm_start; 38 uint64_t tm_end; 39 tm_start = hal_get_cycles(); 40 if( CONFIG_DEBUG_SYS_THREAD_WAKEUP < tm_start ) 41 printk("\n[DBG] %s : thread %x enter / activate thread %x in process %x / cycle %d\n", 42 __FUNCTION__ , this, trdid, this->process->pid, (uint32_t)tm_start ); 43 #endif 44 36 45 // get target thread ltid and cxy 37 46 ltid_t target_ltid = LTID_FROM_TRDID( trdid ); … … 41 50 if( (target_ltid >= CONFIG_THREAD_MAX_PER_CLUSTER) || cluster_is_undefined( target_cxy ) ) 42 51 { 43 printk("\n[ERROR] in %s : illegal trdid argument\n", __FUNCTION__ ); 52 53 #if CONFIG_DEBUG_SISCALLS_ERROR 54 printk("\n[ERROR] in %s : illegal trdid argument %x\n", __FUNCTION__, trdid ); 55 #endif 44 56 this->errno = EINVAL; 45 57 return -1; … … 51 63 if( thread_xp == XPTR_NULL ) 52 64 { 53 printk("\n[ERROR] in %s : cannot find thread %x in process %x/n", 54 __FUNCTION__ , trdid , CURRENT_THREAD->process->pid ); 65 66 #if CONFIG_DEBUG_SISCALLS_ERROR 67 printk("\n[ERROR] in %s : cannot find thread %x in process %x/n", 68 __FUNCTION__ , trdid , this->process->pid ); 69 #endif 55 70 CURRENT_THREAD->errno = EINVAL; 56 71 return -1; … … 60 75 thread_unblock( thread_xp , THREAD_BLOCKED_GLOBAL ); 61 76 77 #if CONFIG_DEBUG_SYS_THREAD_WAKEUP 78 tm_end = hal_get_cycles(); 79 if( CONFIG_DEBUG_SYS_THREAD_WAKEUP < tm_end ) 80 printk("\n[DBG] %s : thread %x exit / thread %x in process %x activated / cycle %d\n", 81 __FUNCTION__ , this, trdid, this->process->pid, (uint32_t)tm_end ); 82 #endif 83 62 84 return 0; 85 63 86 } // end sys_thread_wakeup()
Note: See TracChangeset
for help on using the changeset viewer.