diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2010-07-02 18:55:54 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2010-07-02 18:55:54 -0500 |
commit | e887bf5059d294643283226cd90957e284a58010 (patch) | |
tree | 481ab8a3924a3f739f34b64b953b9d1e1c12378c /src/lib/syscall_task.C | |
parent | 5b5d7cda3184ff7456d1b43b8dfb5e212709ee75 (diff) | |
download | talos-hostboot-e887bf5059d294643283226cd90957e284a58010.tar.gz talos-hostboot-e887bf5059d294643283226cd90957e284a58010.zip |
Memory map and execution fixes for simics.
Diffstat (limited to 'src/lib/syscall_task.C')
-rw-r--r-- | src/lib/syscall_task.C | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/syscall_task.C b/src/lib/syscall_task.C index a29a9a94c..d637b45af 100644 --- a/src/lib/syscall_task.C +++ b/src/lib/syscall_task.C @@ -24,11 +24,11 @@ void task_end() tid_t task_gettid() { - // Even though we have a syscall for GETTID, we can implement this as a - // direct access to SPRG3. On processor that do not support unprivilaged - // access to this SPR, we implement it as an emulated instruction in the - // exception handler. + // Even though we have a syscall for GETTID, we also have the task in + // GRP13. - return TaskManager::getCurrentTask()->tid; + register task_t* task; + asm volatile("addi %0, 13, 0" : "=r"(task)); + return task->tid; //return (tid_t)_syscall0(TASK_GETTID); } |