summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/taskmgr.H
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2010-06-02 17:45:11 -0500
committerPatrick Williams <iawillia@us.ibm.com>2010-06-02 17:45:11 -0500
commit2cc0de1f136026f13ca6de363d9e57831c6ba10b (patch)
tree5653bf1244af8c97e63745536bf5ca887d06ea36 /src/include/kernel/taskmgr.H
parent5235cd52014205f358f1a295c5228091e1847efb (diff)
downloadblackbird-hostboot-2cc0de1f136026f13ca6de363d9e57831c6ba10b.tar.gz
blackbird-hostboot-2cc0de1f136026f13ca6de363d9e57831c6ba10b.zip
Initial cpu / task structs.
Diffstat (limited to 'src/include/kernel/taskmgr.H')
-rw-r--r--src/include/kernel/taskmgr.H31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/kernel/taskmgr.H b/src/include/kernel/taskmgr.H
new file mode 100644
index 000000000..7f23c8821
--- /dev/null
+++ b/src/include/kernel/taskmgr.H
@@ -0,0 +1,31 @@
+#ifndef __KERNEL_TASKMGR_H
+#define __KENREL_TASKMGR_H
+
+#include <kernel/types.h>
+
+class TaskManager
+{
+ public:
+ static task_t* getCurrentTask();
+
+ typedef void(*task_fn_t)();
+
+ friend class CpuManager;
+ protected:
+ TaskManager();
+ ~TaskManager() {};
+
+ static task_t* createIdleTask();
+ static task_t* createTask(task_fn_t);
+
+ private:
+ tid_t getNextTid();
+
+ tid_t iv_nextTid;
+
+ static void idleTaskLoop();
+ task_t* _createIdleTask();
+ task_t* _createTask(task_fn_t, bool);
+};
+
+#endif
OpenPOWER on IntegriCloud