Changes in kernel/generic/src/interrupt/interrupt.c [e4d96e9:63e27ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
re4d96e9 r63e27ef 40 40 */ 41 41 42 #include <assert.h> 42 43 #include <interrupt.h> 43 #include <debug.h>44 44 #include <console/kconsole.h> 45 45 #include <console/console.h> … … 76 76 { 77 77 #if (IVT_ITEMS > 0) 78 ASSERT(n < IVT_ITEMS);78 assert(n < IVT_ITEMS); 79 79 #endif 80 80 … … 102 102 { 103 103 #if (IVT_ITEMS > 0) 104 ASSERT(n < IVT_ITEMS);104 assert(n < IVT_ITEMS); 105 105 #endif 106 106 … … 112 112 } 113 113 114 /* Account CPU usage if it has wakedup from sleep */115 if (CPU ) {114 /* Account CPU usage if it woke up from sleep */ 115 if (CPU && CPU->idle) { 116 116 irq_spinlock_lock(&CPU->lock, false); 117 if (CPU->idle) { 118 uint64_t now = get_cycle(); 119 CPU->idle_cycles += now - CPU->last_cycle; 120 CPU->last_cycle = now; 121 CPU->idle = false; 122 } 117 uint64_t now = get_cycle(); 118 CPU->idle_cycles += now - CPU->last_cycle; 119 CPU->last_cycle = now; 120 CPU->idle = false; 123 121 irq_spinlock_unlock(&CPU->lock, false); 124 122 }
Note:
See TracChangeset
for help on using the changeset viewer.