diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
commit | 4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4 (patch) | |
tree | c193acf64ff2db985f6664f161cf586c3caeb684 /src/kernel/task/task.cpp | |
parent | eae9997d3c2dbaef53022ddabe61c1800a619499 (diff) | |
download | TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.tar.gz TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.zip |
All FWIK is deleted. YOSH is now pure C. Not-working KBASIC included.
Diffstat (limited to 'src/kernel/task/task.cpp')
-rw-r--r-- | src/kernel/task/task.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel/task/task.cpp b/src/kernel/task/task.cpp index 4a802b8..91f802d 100644 --- a/src/kernel/task/task.cpp +++ b/src/kernel/task/task.cpp @@ -119,10 +119,10 @@ uint32_t tasking_handleException(registers *regs) { *ke_vt << "\n (PID " << current_thread->process->pid << ") "; if (regs->int_no == 14) { *ke_vt << ">>> Process exiting.\n"; - thread_exit_stackJmp(EX_PR_EXCEPTION); + thread_exit_stackJmp(EX_PAGEFAULT); } else { *ke_vt << ">>> Thread exiting.\n"; - thread_exit_stackJmp(EX_TH_EXCEPTION); + thread_exit_stackJmp(EX_EXCEPTION); } PANIC("This should never have happened. Please report this."); return 0; @@ -160,7 +160,7 @@ void thread_exit2(uint32_t reason) { //See EX_TH_* defines in task.h process* pr; if (th == 0 || th->process == 0) goto retrn; pr = th->process; - if ((reason == EX_TH_NORMAL || reason == EX_TH_EXCEPTION) && pr->thread_count > 1) { + if ((reason == EX_NOTHREADS || reason == EX_EXCEPTION) && pr->thread_count > 1) { delete th; } else { pr->finish(reason); @@ -188,12 +188,12 @@ void thread_exit_stackJmp(uint32_t reason) { /* System call. Exit the current thread. */ void thread_exit() { - thread_exit_stackJmp(EX_TH_NORMAL); + thread_exit_stackJmp(EX_NOTHREADS); } /* System call. Exit the current process. */ void process_exit(size_t retval) { - if (retval == EX_TH_NORMAL || retval == EX_TH_EXCEPTION) retval = EX_PR_EXCEPTION; + if (retval == EX_EXCEPTION || retval == EX_NOTHREADS || retval == EX_PAGEFAULT) retval = EX_INVALID; thread_exit_stackJmp(retval); } |