Changeset cefb126 in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2010-07-02T14:19:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 89c57b6
- Parents:
- fe7abd0 (diff), e3ee9b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rfe7abd0 rcefb126 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); … … 110 112 } 111 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); 123 112 124 uint64_t begin_cycle = get_cycle(); 113 125 … … 131 143 uint64_t end_cycle = get_cycle(); 132 144 145 irq_spinlock_lock(&exctbl_lock, false); 133 146 exc_table[n].cycles += end_cycle - begin_cycle; 134 147 exc_table[n].count++; 148 irq_spinlock_unlock(&exctbl_lock, false); 135 149 136 150 /* Do not charge THREAD for exception cycles */
Note:
See TracChangeset
for help on using the changeset viewer.