Changeset 03362fbd in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2013-02-09T23:14:45Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 22dfd38
- Parents:
- b5d2e57 (diff), 005b765 (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
-
kernel/generic/src/interrupt/interrupt.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rb5d2e57 r03362fbd 50 50 #include <panic.h> 51 51 #include <print.h> 52 #include <stdarg.h> 52 53 #include <symtab.h> 53 54 #include <proc/thread.h> … … 165 166 } 166 167 167 /** Terminate thread and task if exception came from userspace. 168 * 169 */ 170 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 171 { 172 if (!istate_from_uspace(istate)) 173 return; 174 168 static NO_TRACE 169 void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 170 { 175 171 printf("Task %s (%" PRIu64 ") killed due to an exception at " 176 172 "program counter %p.\n", TASK->name, TASK->taskid, … … 181 177 182 178 printf("Kill message: "); 179 vprintf(fmt, args); 180 printf("\n"); 181 182 task_kill_self(true); 183 } 184 185 /** Terminate thread and task after the exception came from userspace. 186 * 187 */ 188 NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...) 189 { 190 va_list args; 191 192 va_start(args, fmt); 193 fault_from_uspace_core(istate, fmt, args); 194 va_end(args); 195 } 196 197 /** Terminate thread and task if exception came from userspace. 198 * 199 */ 200 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 201 { 202 if (!istate_from_uspace(istate)) 203 return; 183 204 184 205 va_list args; 185 206 va_start(args, fmt); 186 vprintf(fmt, args);207 fault_from_uspace_core(istate, fmt, args); 187 208 va_end(args); 188 printf("\n");189 190 task_kill_self(true);191 209 } 192 210
Note:
See TracChangeset
for help on using the changeset viewer.
