diff TaskManager/kernel/ppe/HTaskInfo.cc @ 63:54355e641172

*** empty log message ***
author gongo
date Sun, 17 Feb 2008 10:55:22 +0900
parents 90523ccc4dff
children 519d24aa7ac8
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/HTaskInfo.cc	Sat Feb 16 21:42:17 2008 +0900
+++ b/TaskManager/kernel/ppe/HTaskInfo.cc	Sun Feb 17 10:55:22 2008 +0900
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include "TaskManagerImpl.h"
 #include "HTaskInfo.h"
 
 HTaskInfo::HTaskInfo(void)
@@ -62,6 +63,7 @@
     q->wait_me  = NULL;
     q->wait_i   = NULL;
     q->post_func = NULL;
+    q->mimpl     = NULL;
 
     return q;
 }
@@ -83,3 +85,27 @@
     }
     freeHTask = htaskPool = NULL;
 }
+
+
+/**
+ * manager->set_task_depend(task1, task2); // task2 は task1 の終了を待つ
+ *
+ * ってやるより
+ *
+ * task2->set_depend(task1);
+ *
+ * ってやったほうがわかりやすいよねー的な話し合いで
+ * 下のようなAPIを作りました
+ */
+
+void
+HTask::spawn(void)
+{
+    mimpl->spawn_task(this);
+}
+
+void
+HTask::set_depend(HTaskPtr master)
+{
+    mimpl->set_task_depend(master, this);
+}