Changeset 09b859c in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2010-07-07T18:37:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77385fe
- Parents:
- e2ea4ab1 (diff), 22c3444 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
re2ea4ab1 r09b859c 55 55 #include <arch/cycle.h> 56 56 #include <str.h> 57 #include <trace.h> 57 58 58 59 exc_table_t exc_table[IVT_ITEMS]; … … 97 98 * 98 99 */ 99 void exc_dispatch(unsigned int n, istate_t *istate) 100 { 101 ASSERT(CPU); 102 100 NO_TRACE void exc_dispatch(unsigned int n, istate_t *istate) 101 { 103 102 #if (IVT_ITEMS > 0) 104 103 ASSERT(n < IVT_ITEMS); … … 113 112 114 113 /* Account CPU usage if it has waked up from sleep */ 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); 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 } 123 124 124 125 uint64_t begin_cycle = get_cycle(); … … 159 160 * 160 161 */ 161 static void exc_undef(unsigned int n, istate_t *istate)162 NO_TRACE static void exc_undef(unsigned int n, istate_t *istate) 162 163 { 163 164 fault_if_from_uspace(istate, "Unhandled exception %u.", n); … … 168 169 * 169 170 */ 170 void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)171 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 171 172 { 172 173 if (!istate_from_uspace(istate)) … … 215 216 * 216 217 */ 217 static int cmd_exc_print(cmd_arg_t *argv)218 NO_TRACE static int cmd_exc_print(cmd_arg_t *argv) 218 219 { 219 220 bool excs_all;
Note:
See TracChangeset
for help on using the changeset viewer.