diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-08-11 00:17:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-08-16 08:11:55 -0500 |
commit | 82fa7a749fbd1d8f17891dbd97b17a3bdae36c53 (patch) | |
tree | 5e4857f1fc30e6b9506ac4973f597f17c8b16738 /src/include/kernel/task.H | |
parent | ab9e15e2e44eb52d4d0aa3602498a62db0cc0c37 (diff) | |
download | talos-hostboot-82fa7a749fbd1d8f17891dbd97b17a3bdae36c53.tar.gz talos-hostboot-82fa7a749fbd1d8f17891dbd97b17a3bdae36c53.zip |
Implement Kernel->User-space message bridge.
Change-Id: Icf6fc9e10b1c39e981dddf180607b710c597112b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/249
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel/task.H')
-rw-r--r-- | src/include/kernel/task.H | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/include/kernel/task.H b/src/include/kernel/task.H index 6cd49028d..b72322d83 100644 --- a/src/include/kernel/task.H +++ b/src/include/kernel/task.H @@ -29,17 +29,17 @@ struct task_t { /** Pointer to the CPU this task is assigned to. */ cpu_t* cpu; - /** Context information. This MUST stay here due to + /** Context information. This MUST stay here due to * save-restore asm code. */ context_t context; - + /** Task ID */ tid_t tid; /** Determines if user-space would like this task pinned to a CPU. * This value is considered a count of the number of times the pinned * as been requested, so pinning can be used recursively. */ uint64_t affinity_pinned; - + // Pointers for queue containers. task_t* prev; task_t* next; @@ -47,4 +47,17 @@ struct task_t enum { TASK_DEFAULT_STACK_SIZE = 4 }; +// Macros for manipulating task's saved contexts. +#define TASK_GETARGN(t, n) (t->context.gprs[n+4]) +#define TASK_GETARG0(t) (TASK_GETARGN(t,0)) +#define TASK_GETARG1(t) (TASK_GETARGN(t,1)) +#define TASK_GETARG2(t) (TASK_GETARGN(t,2)) +#define TASK_GETARG3(t) (TASK_GETARGN(t,3)) +#define TASK_GETARG4(t) (TASK_GETARGN(t,4)) +#define TASK_GETARG5(t) (TASK_GETARGN(t,5)) +#define TASK_GETARG6(t) (TASK_GETARGN(t,6)) +#define TASK_GETARG7(t) (TASK_GETARGN(t,7)) +#define TASK_SETRTN(t, n) (t->context.gprs[3] = (n)) + + #endif |