diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-10-03 16:12:51 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-10-24 13:33:20 -0500 |
commit | 4962a22309cd7e3586aa57817689b18d67ca71c7 (patch) | |
tree | 2bfd610d6ed048f7d4a35717211eca06b15d1f69 /src/kernel/exception.C | |
parent | 21185b30cd99a00f01e15edba28402cdc00de1d1 (diff) | |
download | talos-hostboot-4962a22309cd7e3586aa57817689b18d67ca71c7.tar.gz talos-hostboot-4962a22309cd7e3586aa57817689b18d67ca71c7.zip |
Support task_wait / task_wait_tid syscalls:
- Add task_end2 syscall to allow pthread_exit-like retval.
- Add/maintain task states.
- Create task parent/child tracking tree.
- Add task_detach function.
- Implement wait syscalls.
Make task_exec caller the parent of spawned task:
Previously the task_exec call caused a message to the
VFS task, which called task_create and returned the tid
in response to the message. This causes the parent of
the spawned task to appear to be the VFS task.
Modify task_exec / VFS handling to instead return the
entry point address on the message and have task_exec call
task_create directly itself.
Change-Id: I6b6796f45875de37b1ab01e7596639b073820b95
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/443
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src/kernel/exception.C')
-rw-r--r-- | src/kernel/exception.C | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/kernel/exception.C b/src/kernel/exception.C index 6f015a57c..cbe97b220 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -29,7 +29,6 @@ #include <kernel/vmmmgr.H> #include <kernel/cpuid.H> -namespace Systemcalls { void TaskEnd(task_t*); } namespace ExceptionHandles { bool HvEmulation(task_t*); @@ -54,7 +53,7 @@ void kernel_execute_prog_ex() if (!handled) { printk("Program exception, killing task %d\n", t->tid); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } } @@ -78,7 +77,7 @@ void kernel_execute_data_storage() { printk("Data Storage exception on %d: %lx, %lx\n", t->tid, getDAR(), getDSISR()); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } } @@ -87,7 +86,7 @@ void kernel_execute_data_segment() { task_t* t = TaskManager::getCurrentTask(); printk("Data Segment exception, killing task %d\n", t->tid); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } const uint64_t EXCEPTION_SRR1_INSTR_MASK = 0x0000000040000000; @@ -110,7 +109,7 @@ void kernel_execute_inst_storage() { printk("Inst Storage exception on %d: %lx, %lx\n", t->tid, getSRR0(), getSRR1()); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } } @@ -119,7 +118,7 @@ void kernel_execute_inst_segment() { task_t* t = TaskManager::getCurrentTask(); printk("Inst Segment exception, killing task %d\n", t->tid); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } extern "C" @@ -127,7 +126,7 @@ void kernel_execute_alignment() { task_t* t = TaskManager::getCurrentTask(); printk("Alignment exception, killing task %d\n", t->tid); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } extern "C" @@ -136,7 +135,7 @@ void kernel_execute_hype_emu_assist() task_t* t = TaskManager::getCurrentTask(); printk("HypeEmu: Illegal instruction in task %d\n" "\tHSSR0 = %lx, HEIR = %lx\n", t->tid, getHSRR0(), getHEIR()); - Systemcalls::TaskEnd(t); + TaskManager::endTask(t, NULL, TASK_STATUS_CRASHED); } namespace ExceptionHandles |