Changes in kernel/generic/src/interrupt/interrupt.c [8f4f444:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r8f4f444 r9d58539 50 50 #include <panic.h> 51 51 #include <print.h> 52 #include <stdarg.h>53 52 #include <symtab.h> 54 53 #include <proc/thread.h> … … 166 165 } 167 166 168 static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 169 { 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 170 175 printf("Task %s (%" PRIu64 ") killed due to an exception at " 171 176 "program counter %p.\n", TASK->name, TASK->taskid, … … 176 181 177 182 printf("Kill message: "); 178 vprintf(fmt, args);179 printf("\n");180 181 task_kill_self(true);182 }183 184 /** Terminate thread and task after the exception came from userspace.185 *186 */187 NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...)188 {189 va_list args;190 191 va_start(args, fmt);192 fault_from_uspace_core(istate, fmt, args);193 va_end(args);194 }195 196 /** Terminate thread and task if exception came from userspace.197 *198 */199 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)200 {201 if (!istate_from_uspace(istate))202 return;203 183 204 184 va_list args; 205 185 va_start(args, fmt); 206 fault_from_uspace_core(istate,fmt, args);186 vprintf(fmt, args); 207 187 va_end(args); 188 printf("\n"); 189 190 task_kill_self(true); 208 191 } 209 192
Note:
See TracChangeset
for help on using the changeset viewer.