Changeset 637 for trunk/kernel/syscalls/sys_thread_wakeup.c
- Timestamp:
- Jul 18, 2019, 2:06:55 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_wakeup.c
r566 r637 1 1 /* 2 * sys_thread_wakeup.c - wakeup all indicated threads2 * sys_thread_wakeup.c - wakeup indicated thread 3 3 * 4 * Author Alain Greiner (2016,2017 )4 * Author Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 36 36 process_t * process = this->process; 37 37 38 #if (DEBUG_SYS_THREAD_WAKEUP || CONFIG_INSTRUMENTATION_SYSCALLS) 39 uint64_t tm_start = hal_get_cycles(); 40 #endif 41 38 42 #if DEBUG_SYS_THREAD_WAKEUP 39 uint64_t tm_start;40 uint64_t tm_end;41 tm_start = hal_get_cycles();42 43 if( DEBUG_SYS_THREAD_WAKEUP < tm_start ) 43 printk("\n[ DBG] %s :thread %x in process enter to activate thread %x / cycle %d\n",44 printk("\n[%s] thread %x in process enter to activate thread %x / cycle %d\n", 44 45 __FUNCTION__, this->trdid, process->pid, trdid, (uint32_t)tm_start ); 45 46 #endif … … 50 51 51 52 // check trdid argument 52 if( (target_ltid >= CONFIG_THREADS_MAX_PER_CLUSTER) || cluster_is_undefined( target_cxy ) ) 53 if( (target_ltid >= CONFIG_THREADS_MAX_PER_CLUSTER) || 54 (cluster_is_active( target_cxy ) == false) ) 53 55 { 54 56 … … 78 80 thread_unblock( thread_xp , THREAD_BLOCKED_GLOBAL ); 79 81 82 #if (DEBUG_SYS_THREAD_WAKEUP || CONFIG_INSTRUMENTATION_SYSCALLS) 83 uint64_t tm_end = hal_get_cycles(); 84 #endif 85 86 80 87 #if DEBUG_SYS_THREAD_WAKEUP 81 tm_end = hal_get_cycles();82 88 if( DEBUG_SYS_THREAD_WAKEUP < tm_end ) 83 printk("\n[ DBG] %s :thread %x in process %x exit / thread %x activated / cycle %d\n",89 printk("\n[%s] thread %x in process %x exit / thread %x activated / cycle %d\n", 84 90 __FUNCTION__ , this->trdid, process->pid, trdid, (uint32_t)tm_end ); 91 #endif 92 93 #if CONFIG_INSTRUMENTATION_SYSCALLS 94 hal_atomic_add( &syscalls_cumul_cost[SYS_THREAD_WAKEUP] , tm_end - tm_start ); 95 hal_atomic_add( &syscalls_occurences[SYS_THREAD_WAKEUP] , 1 ); 85 96 #endif 86 97
Note: See TracChangeset
for help on using the changeset viewer.