Changeset 4760793 in mainline for kernel/generic/src/time/clock.c
- Timestamp:
- 2024-01-14T18:23:40Z (4 months ago)
- Branches:
- master
- Children:
- 5663872, c7ceacf
- Parents:
- 3b68542
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/time/clock.c
r3b68542 r4760793 124 124 { 125 125 uint64_t now = get_cycle(); 126 atomic_time_increment(&CPU->busy_cycles, now - CPU ->last_cycle);127 CPU ->last_cycle = now;126 atomic_time_increment(&CPU->busy_cycles, now - CPU_LOCAL->last_cycle); 127 CPU_LOCAL->last_cycle = now; 128 128 } 129 129 … … 137 137 void clock(void) 138 138 { 139 size_t missed_clock_ticks = CPU ->missed_clock_ticks;140 CPU ->missed_clock_ticks = 0;141 142 CPU ->current_clock_tick += missed_clock_ticks + 1;143 uint64_t current_clock_tick = CPU ->current_clock_tick;139 size_t missed_clock_ticks = CPU_LOCAL->missed_clock_ticks; 140 CPU_LOCAL->missed_clock_ticks = 0; 141 142 CPU_LOCAL->current_clock_tick += missed_clock_ticks + 1; 143 uint64_t current_clock_tick = CPU_LOCAL->current_clock_tick; 144 144 clock_update_counters(current_clock_tick); 145 145 … … 186 186 187 187 if (THREAD) { 188 if (current_clock_tick >= CPU ->preempt_deadline && PREEMPTION_ENABLED) {188 if (current_clock_tick >= CPU_LOCAL->preempt_deadline && PREEMPTION_ENABLED) { 189 189 scheduler(); 190 190 #ifdef CONFIG_UDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.