Changeset da68871a in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2012-08-08T08:46:22Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30c0826
- Parents:
- bc216a0 (diff), 1d01cca (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
rbc216a0 rda68871a 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> … … 163 164 } 164 165 165 /** Terminate thread and task if exception came from userspace. 166 * 167 */ 168 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 169 { 170 if (!istate_from_uspace(istate)) 171 return; 172 166 static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 167 { 173 168 printf("Task %s (%" PRIu64 ") killed due to an exception at " 174 169 "program counter %p.\n", TASK->name, TASK->taskid, … … 179 174 180 175 printf("Kill message: "); 176 vprintf(fmt, args); 177 printf("\n"); 178 179 task_kill_self(true); 180 } 181 182 /** Terminate thread and task after the exception came from userspace. 183 * 184 */ 185 NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...) 186 { 187 va_list args; 188 189 va_start(args, fmt); 190 fault_from_uspace_core(istate, fmt, args); 191 va_end(args); 192 } 193 194 /** Terminate thread and task if exception came from userspace. 195 * 196 */ 197 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 198 { 199 if (!istate_from_uspace(istate)) 200 return; 181 201 182 202 va_list args; 183 203 va_start(args, fmt); 184 vprintf(fmt, args);204 fault_from_uspace_core(istate, fmt, args); 185 205 va_end(args); 186 printf("\n");187 188 task_kill_self(true);189 206 } 190 207
Note:
See TracChangeset
for help on using the changeset viewer.