diff TaskManager/Cell/CellTaskListInfo.cc @ 60:f50c74835a9b

*** empty log message ***
author gongo
date Sat, 16 Feb 2008 20:05:35 +0900
parents 1f8a23cdeec3
children 5c194c71eca8
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskListInfo.cc	Sat Feb 16 19:57:23 2008 +0900
+++ b/TaskManager/Cell/CellTaskListInfo.cc	Sat Feb 16 20:05:35 2008 +0900
@@ -2,10 +2,13 @@
 #include <stdlib.h>
 #include "CellTaskListInfo.h"
 
+#define NEXT_ADDR(addr, size) \
+    (TaskListPtr)((int)(addr) + (size))
+
 int
 CellTaskListInfo::extend_pool(int num)
 {
-    TaskListPtr q = NULL, p;
+    TaskListPtr q = NULL;
     int unit_size;
     
     unit_size = (ROUND_UP_ALIGN(sizeof(TaskList), 16));
@@ -19,9 +22,9 @@
     taskListPool = q;
     
     /* Connect all free pack_list in the pool */
-    q = NEXT_ADDR(taskListPool,unit_size); // q = taskListPool + 1;
-    for (; --num > 0; q = NEXT_ADDR(q + unit_size)) {
-        q->naext = NEXT_ADDR(q, unit_size); // q->next = q + 1;
+    q = NEXT_ADDR(taskListPool, unit_size); // q = taskListPool + 1;
+    for (; --num > 0; q = NEXT_ADDR(q, unit_size)) {
+        q->next = NEXT_ADDR(q, unit_size); // q->next = q + 1;
     }
     q->next = freeTaskList;
     freeTaskList = NEXT_ADDR(taskListPool, unit_size);