diff TaskManager/kernel/ppe/TaskQueue.cc @ 479:bf2d2625485e draft

Double Linked List base TaskQueue
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 05 Oct 2009 10:36:37 +0900
parents 028ffc9c0375
children 5f4ffff2c2aa
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/TaskQueue.cc	Mon Oct 05 08:56:56 2009 +0900
+++ b/TaskManager/kernel/ppe/TaskQueue.cc	Mon Oct 05 10:36:37 2009 +0900
@@ -1,21 +1,10 @@
 #include "TaskQueue.h"
 
-TaskQueue::TaskQueue(TaskPtr q)
+TaskQueue::TaskQueue(Task *q)
 {
     task = q;
     next = NULL;
+    prev = NULL;
+    waiter = NULL;
 }
 
-TaskQueuePtr
-TaskQueue::append(TaskQueuePtr list, TaskQueuePtr q)
-{
-    TaskQueuePtr p = list;
-
-    if (!p) {
-	return q;
-    } else {
-	while(p->next) p = p->next;
-	p->next = q;
-	return list;
-    }
-}