diff TaskManager/kernel/ppe/HTask.cc @ 1474:b158873485f6 draft

fix simple task
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 16 Jul 2012 11:01:40 +0900
parents 840dee241530
children 163220e54cc0
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/HTask.cc	Mon Jul 16 09:12:55 2012 +0900
+++ b/TaskManager/kernel/ppe/HTask.cc	Mon Jul 16 11:01:40 2012 +0900
@@ -91,8 +91,8 @@
     rbuf = (memaddr)tl;
     bzero(tl->tasks,sizeof(Task)*TASK_MAX_SIZE);
     Task *task = tl->tasks;
-    task->init(id, num_param,num_inData,num_outData);
-    last = task->next();
+    task->init(id, num_param,num_inData,num_outData); // next_task_array が呼ばれれば、これは不要 
+    last = task->next();                              //
     return task;  // first task
 }
 
@@ -125,8 +125,10 @@
 {
     TaskList *tl = (TaskList*)rbuf;
     if (t==0) {
-        tl->tasks->init(id, param_count, inData_count, outData_count);
-        return tl->tasks;
+        TaskPtr task = tl->tasks;
+        task->init(id, param_count, inData_count, outData_count);
+        last = task->next();
+        return task;
     }
     Task *next = t->next();
     if (next >= tl->last()) {
@@ -140,6 +142,7 @@
         rbuf = (memaddr)tl;
     } 
     next->init(id, param_count, inData_count, outData_count);
+    last = next->next();
     return next;
 }