Changes in kernel/generic/src/interrupt/interrupt.c [dfb16c4:8df5f20] in mainline
- File:
-
- 1 edited
-
kernel/generic/src/interrupt/interrupt.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rdfb16c4 r8df5f20 58 58 #include <trace.h> 59 59 60 /*61 * If IVT_ITEMS is zero (e.g. for special/abs32le) we hide completely any62 * access to the exception table array and panic if the function is called63 * at all. It also silences (correct) compiler warnings about possible64 * out-of-bound array access.65 */66 67 60 exc_table_t exc_table[IVT_ITEMS]; 68 61 IRQ_SPINLOCK_INITIALIZE(exctbl_lock); … … 84 77 #if (IVT_ITEMS > 0) 85 78 assert(n < IVT_ITEMS); 79 #endif 86 80 87 81 irq_spinlock_lock(&exctbl_lock, true); … … 97 91 98 92 return old; 99 #else100 panic("No space for any exception handler, cannot register.");101 #endif102 93 } 103 94 … … 112 103 #if (IVT_ITEMS > 0) 113 104 assert(n < IVT_ITEMS); 105 #endif 114 106 115 107 /* Account user cycles */ … … 122 114 /* Account CPU usage if it woke up from sleep */ 123 115 if (CPU && CPU->idle) { 116 irq_spinlock_lock(&CPU->lock, false); 124 117 uint64_t now = get_cycle(); 125 atomic_time_increment(&CPU->idle_cycles, now - CPU->last_cycle);118 CPU->idle_cycles += now - CPU->last_cycle; 126 119 CPU->last_cycle = now; 127 120 CPU->idle = false; 121 irq_spinlock_unlock(&CPU->lock, false); 128 122 } 129 123 … … 160 154 irq_spinlock_unlock(&THREAD->lock, false); 161 155 } 162 #else163 panic("No space for any exception handler, yet we want to handle some exception.");164 #endif165 156 } 166 157
Note:
See TracChangeset
for help on using the changeset viewer.
