Changes in kernel/generic/src/interrupt/interrupt.c [b584cd4:d0c82c5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rb584cd4 rd0c82c5 99 99 void exc_dispatch(unsigned int n, istate_t *istate) 100 100 { 101 ASSERT(CPU); 102 101 103 #if (IVT_ITEMS > 0) 102 104 ASSERT(n < IVT_ITEMS); … … 109 111 irq_spinlock_unlock(&THREAD->lock, false); 110 112 } 113 114 /* Account CPU usage if it has waked up from sleep */ 115 irq_spinlock_lock(&CPU->lock, false); 116 if (CPU->idle) { 117 uint64_t now = get_cycle(); 118 CPU->idle_cycles += now - CPU->last_cycle; 119 CPU->last_cycle = now; 120 CPU->idle = false; 121 } 122 irq_spinlock_unlock(&CPU->lock, false); 111 123 112 124 uint64_t begin_cycle = get_cycle();
Note:
See TracChangeset
for help on using the changeset viewer.