diff TaskManager/Cell/CellTaskManagerImpl.cc @ 956:15026ebf7a17

unified queue worked on Mac OS X
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 04 Aug 2010 17:02:26 +0900
parents 0d404f6c36a8
children 559d041313dc
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc	Wed Aug 04 16:46:25 2010 +0900
+++ b/TaskManager/Cell/CellTaskManagerImpl.cc	Wed Aug 04 17:02:26 2010 +0900
@@ -4,7 +4,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include "CellTaskManagerImpl.h"
-#include "HTaskInfo.h"
+#include "HTask.h"
+#include "QueueInfo.h"
 #include "SchedTask.h"
 #include "MainScheduler.h"
 #include "types.h"
@@ -26,7 +27,7 @@
     spe_running = 0;
 
     // 実行可能な HTask のリスト。 FifoTaskManager と共有される
-    activeTaskQueue = new HTaskInfo();
+    activeTaskQueue = new QueueInfo<HTask>(htaskPool);
     // HTask の factory。 HTaskInfo ならなんでもいい。
     htaskImpl = activeTaskQueue ; // any HTaskInfo
     
@@ -34,12 +35,12 @@
     speThreads->init();
 
     // 実行される Task 用の パイプライン用のダブルバッファ
-    speTaskList  = new TaskListInfoPtr[machineNum]; // spe上の走っている Task の配列
-    taskListInfo  = new TaskListInfoPtr[machineNum]; // 次に走る Task の配列
+    speTaskList   = new *QueueInfo<TaskList>[machineNum]; // spe上の走っている Task の配列
+    taskListInfo  = new *QueueInfo<TaskList>[machineNum]; // 次に走る Task の配列
 
     for (int i = 0; i < machineNum; i++) {
-	taskListInfo[i] = new TaskListInfo();
-	speTaskList[i] = new TaskListInfo();
+	taskListInfo[i] = new QueueInfo<TaskList>(taskListPool);
+	speTaskList[i] = new QueueInfo<TaskList>(taskListPool);
     }
 
     // PPE 側の管理をする Manager