Changeset 637 for trunk/kernel/syscalls/sys_timeofday.c
- Timestamp:
- Jul 18, 2019, 2:06:55 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_timeofday.c
r635 r637 50 50 process_t * process = this->process; 51 51 52 #if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS) 53 uint64_t tm_start = hal_get_cycles(); 54 #endif 55 56 #if DEBUG_SYS_TIMEOFDAY 57 if( DEBUG_SYS_TIMEOFDAY < tm_start ) 58 printk("\n[%s] thread[%x,%x] enter / cycle %d\n", 59 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_start ); 60 #endif 61 52 62 // check tz (non supported / must be null) 53 63 if( tz ) … … 82 92 83 93 // copy values to user space 84 hal_copy_to_uspace( local_cxy, 85 &k_tv, 86 tv, 94 hal_copy_to_uspace( tv, 95 XPTR( local_cxy , &k_tv ), 87 96 sizeof(struct timeval) ); 88 97 89 98 hal_fence(); 90 99 100 #if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS) 101 uint64_t tm_end = hal_get_cycles(); 102 #endif 103 104 #if DEBUG_SYS_TIMEOFDAY 105 if( DEBUG_SYS_TIMEOFDAY < tm_end ) 106 printk("\n[%s] thread[%x,%x] exit / cycle %d\n", 107 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_end ); 108 #endif 109 110 #if CONFIG_INSTRUMENTATION_SYSCALLS 111 hal_atomic_add( &syscalls_cumul_cost[SYS_TIMEOFDAY] , tm_end - tm_start ); 112 hal_atomic_add( &syscalls_occurences[SYS_TIMEOFDAY] , 1 ); 113 #endif 114 91 115 return 0; 92 116
Note: See TracChangeset
for help on using the changeset viewer.