Changes in kernel/generic/src/interrupt/interrupt.c [63e27ef:e4d96e9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r63e27ef re4d96e9 40 40 */ 41 41 42 #include <assert.h>43 42 #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 wokeup from sleep */115 if (CPU && CPU->idle) {114 /* Account CPU usage if it has waked up from sleep */ 115 if (CPU) { 116 116 irq_spinlock_lock(&CPU->lock, false); 117 uint64_t now = get_cycle(); 118 CPU->idle_cycles += now - CPU->last_cycle; 119 CPU->last_cycle = now; 120 CPU->idle = 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 } 121 123 irq_spinlock_unlock(&CPU->lock, false); 122 124 }
Note:
See TracChangeset
for help on using the changeset viewer.