summaryrefslogtreecommitdiff
path: root/src/kernel/task/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/task/task.c')
-rw-r--r--src/kernel/task/task.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/kernel/task/task.c b/src/kernel/task/task.c
index a37d44b..8cdf7b3 100644
--- a/src/kernel/task/task.c
+++ b/src/kernel/task/task.c
@@ -107,8 +107,13 @@ uint32_t tasking_handleException(struct registers *regs) {
"Page Fault","Unknown Interrupt","Coprocessor Fault","Alignment Check","Machine Check"};
monitor_write(exception_messages[regs->int_no]);
monitor_write(" at "); monitor_writeHex(regs->eip);
- monitor_write("\n>>> Thread exiting.\n");
- thread_exit_stackJmp(EX_TH_EXCEPTION);
+ if (regs->int_no == 14) {
+ monitor_write("\n>>> Process exiting.\n");
+ thread_exit_stackJmp(EX_PR_EXCEPTION);
+ } else {
+ monitor_write("\n>>> Thread exiting.\n");
+ thread_exit_stackJmp(EX_TH_EXCEPTION);
+ }
PANIC("This should never have happened. Please report this.");
}