Changeset 433 for trunk/kernel/kern/core.c
- Timestamp:
- Feb 14, 2018, 3:40:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/core.c
r409 r433 75 75 } 76 76 77 /* deprecated 14/08/2017 [AG]78 //////////////////////////////////////79 void core_time_update( core_t * core )80 {81 uint32_t elapsed;82 uint32_t ticks_nr = core->ticks_nr;83 uint64_t cycles = core->cycles;84 uint32_t time_stamp = core->time_stamp;85 uint32_t time_now = hal_get_cycles();86 87 // compute number of elapsed cycles taking into account 32 bits register wrap88 if( time_now < time_stamp ) elapsed = (0xFFFFFFFF - time_stamp) + time_now;89 else elapsed = time_now - time_stamp;90 91 cycles += elapsed;92 ticks_nr = elapsed / core->ticks_period;93 94 core->time_stamp = time_now;95 core->cycles = cycles + elapsed;96 core->ticks_nr = ticks_nr + (elapsed / core->ticks_period);97 hal_fence();98 }99 */100 101 77 //////////////////////////////// 102 78 void core_clock( core_t * core ) … … 136 112 hal_fence(); 137 113 138 #if CONFIG_SHOW_CPU_USAGE139 printk(INFO, "INFO: core %d in cluster %x : busy_percent = %d / cumulated_usage = %d\n",140 core->lid, local_cxy , busy_percent , usage );141 #endif142 143 114 core->ticks_nr = 0; 144 115 idle->ticks_nr = 0;
Note: See TracChangeset
for help on using the changeset viewer.