Changeset 181a746 in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2012-07-10T17:50:29Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5b6c033
- Parents:
- 22b5924
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r22b5924 r181a746 110 110 } 111 111 112 /* Account CPU usage if it has wakedup from sleep */113 if (CPU ) {112 /* Account CPU usage if it woke up from sleep */ 113 if (CPU && CPU->idle) { 114 114 irq_spinlock_lock(&CPU->lock, false); 115 if (CPU->idle) { 116 uint64_t now = get_cycle(); 117 CPU->idle_cycles += now - CPU->last_cycle; 118 CPU->last_cycle = now; 119 CPU->idle = false; 120 } 115 uint64_t now = get_cycle(); 116 CPU->idle_cycles += now - CPU->last_cycle; 117 CPU->last_cycle = now; 118 CPU->idle = false; 121 119 irq_spinlock_unlock(&CPU->lock, false); 122 120 }
Note:
See TracChangeset
for help on using the changeset viewer.