diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-05-24 22:01:46 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-05-26 10:40:30 -0500 |
commit | 97399f8e048f3fe76bc9fe179546990b8ba54562 (patch) | |
tree | 6491efcd31e67ef6f4670659965cbc75a04ccd9b /src/include/kernel/task.H | |
parent | 90d4e5df06e6108f846013a48b996e936adeffec (diff) | |
download | talos-hostboot-97399f8e048f3fe76bc9fe179546990b8ba54562.tar.gz talos-hostboot-97399f8e048f3fe76bc9fe179546990b8ba54562.zip |
Kernel support for processor affinity.
Change-Id: Ie84a805bad58032085208a98b1b31393def681cb
Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/100
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/include/kernel/task.H')
-rw-r--r-- | src/include/kernel/task.H | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/include/kernel/task.H b/src/include/kernel/task.H index c27c7e8ce..6cd49028d 100644 --- a/src/include/kernel/task.H +++ b/src/include/kernel/task.H @@ -1,8 +1,16 @@ +/** @file task.H + * @brief Defines kernel information about tasks. + */ #ifndef __KERNEL_TASK_H #define __KERNEL_TASK_H #include <kernel/types.h> +/** @struct context_t + * @brief Defines the save-restore context for the task. + * + * See PowerISA for information on registers listed. + */ struct context_t { void* stack_ptr; @@ -14,12 +22,25 @@ struct context_t uint64_t xer; }; +/** @struct task_t + * @brief The kernel-level task structure. + */ struct task_t { + /** Pointer to the CPU this task is assigned to. */ cpu_t* cpu; + /** 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; }; |