diff TaskManager/kernel/ppe/HTask.h @ 366:09f33c51a204

rename include/TaskManager/* and add memory
author aaa
date Mon, 27 Jul 2009 15:51:18 +0900
parents include/TaskManager/HTask.h@b89ba1d96fff
children a4f690f44842
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/kernel/ppe/HTask.h	Mon Jul 27 15:51:18 2009 +0900
@@ -0,0 +1,42 @@
+#ifndef INCLUDED_HTASK
+#define INCLUDED_HTASK
+
+#include "base.h"
+#include "types.h"
+#include "Task.h"
+#include "TaskQueueInfo.h"
+
+class TaskManagerImpl;
+
+/*!
+  @class
+  
+  @brief
+  
+  Cerium の Task で、spawn() でキューに格納されて順次実行される。
+  cpu の指定があれば並列に実行される。
+  特定の Task を待ち合わせる事が可能。
+  Task の入出力は dma などで copy される。
+ */
+
+class HTask : public Task {
+public:
+    BASE_NEW_DELETE(HTask);
+
+    TaskQueuePtr wait_me;  // List of task waiting for me
+    TaskQueuePtr wait_i;   // List of task for which I am waiting
+    void (*post_func)(void *);
+    void *post_arg;
+    CPU_TYPE cpu_type;
+    HTask *next;
+    TaskManagerImpl *mimpl;
+
+    void spawn(void);
+    void wait_for(HTask *);
+    void set_cpu(CPU_TYPE type);
+    void set_post(void (*func)(void *), void *arg);
+};
+
+typedef HTask* HTaskPtr;
+
+#endif