Changes in kernel/generic/src/interrupt/interrupt.c [04e3d9f:4d1be48] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r04e3d9f r4d1be48 55 55 #include <arch/cycle.h> 56 56 #include <str.h> 57 #include <trace.h>58 57 59 58 exc_table_t exc_table[IVT_ITEMS]; … … 98 97 * 99 98 */ 100 NO_TRACE void exc_dispatch(unsigned int n, istate_t *istate) 101 { 99 void exc_dispatch(unsigned int n, istate_t *istate) 100 { 101 ASSERT(CPU); 102 102 103 #if (IVT_ITEMS > 0) 103 104 ASSERT(n < IVT_ITEMS); … … 112 113 113 114 /* Account CPU usage if it has waked up from sleep */ 114 if (CPU) { 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 } 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); 124 123 125 124 uint64_t begin_cycle = get_cycle(); … … 160 159 * 161 160 */ 162 NO_TRACEstatic void exc_undef(unsigned int n, istate_t *istate)161 static void exc_undef(unsigned int n, istate_t *istate) 163 162 { 164 163 fault_if_from_uspace(istate, "Unhandled exception %u.", n); 165 panic ("Unhandled exception %u.", n);164 panic_badtrap(istate, n, "Unhandled exception %u.", n); 166 165 } 167 166 … … 169 168 * 170 169 */ 171 NO_TRACEvoid fault_if_from_uspace(istate_t *istate, const char *fmt, ...)170 void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 172 171 { 173 172 if (!istate_from_uspace(istate)) … … 216 215 * 217 216 */ 218 NO_TRACEstatic int cmd_exc_print(cmd_arg_t *argv)217 static int cmd_exc_print(cmd_arg_t *argv) 219 218 { 220 219 bool excs_all;
Note:
See TracChangeset
for help on using the changeset viewer.