Changeset 637 for trunk/kernel/syscalls/sys_sem.c
- Timestamp:
- Jul 18, 2019, 2:06:55 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_sem.c
r635 r637 58 58 process_t * process = this->process; 59 59 60 #if (DEBUG_SYS_SEM || CONFIG_INSTRUMENTATION_SYSCALLS) 61 uint64_t tm_start = hal_get_cycles(); 62 #endif 63 60 64 #if DEBUG_SYS_SEM 61 uint64_t tm_start;62 uint64_t tm_end;63 tm_start = hal_get_cycles();64 65 if( DEBUG_SYS_SEM < tm_start ) 65 66 printk("\n[DBG] %s : thread %x in process %x enter for %s / cycle %d\n", … … 137 138 138 139 // return value to user 139 hal_copy_to_uspace( local_cxy, 140 ¤t, 141 current_value, 140 hal_copy_to_uspace( current_value, 141 XPTR( local_cxy , ¤t ), 142 142 sizeof(uint32_t) ); 143 143 } … … 224 224 hal_fence(); 225 225 226 #if (DEBUG_SYS_SEM || CONFIG_INSTRUMENTATION_SYSCALLS) 227 uint64_t tm_end = hal_get_cycles(); 228 #endif 229 226 230 #if DEBUG_SYS_SEM 227 tm_end = hal_get_cycles();228 231 if( DEBUG_SYS_SEM < tm_end ) 229 232 printk("\n[DBG] %s : thread %x in process %x exit for %s / cost = %d / cycle %d\n", … … 232 235 #endif 233 236 237 #if CONFIG_INSTRUMENTATION_SYSCALLS 238 hal_atomic_add( &syscalls_cumul_cost[SYS_SEM] , tm_end - tm_start ); 239 hal_atomic_add( &syscalls_occurences[SYS_SEM] , 1 ); 240 #endif 241 234 242 return 0; 235 243
Note: See TracChangeset
for help on using the changeset viewer.