Changes in kernel/generic/src/interrupt/interrupt.c [decfbe56:b584cd4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rdecfbe56 rb584cd4 99 99 void exc_dispatch(unsigned int n, istate_t *istate) 100 100 { 101 ASSERT(CPU);102 103 101 #if (IVT_ITEMS > 0) 104 102 ASSERT(n < IVT_ITEMS); … … 112 110 } 113 111 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);123 124 112 uint64_t begin_cycle = get_cycle(); 125 113 … … 143 131 uint64_t end_cycle = get_cycle(); 144 132 145 irq_spinlock_lock(&exctbl_lock, false);146 133 exc_table[n].cycles += end_cycle - begin_cycle; 147 134 exc_table[n].count++; 148 irq_spinlock_unlock(&exctbl_lock, false);149 135 150 136 /* Do not charge THREAD for exception cycles */
Note:
See TracChangeset
for help on using the changeset viewer.