Mercurial > hg > Game > Cerium
diff TaskManager/Cell/CellBufferManager.cc @ 63:54355e641172
*** empty log message ***
author | gongo |
---|---|
date | Sun, 17 Feb 2008 10:55:22 +0900 |
parents | f50c74835a9b |
children | 519d24aa7ac8 |
line wrap: on
line diff
--- a/TaskManager/Cell/CellBufferManager.cc Sat Feb 16 21:42:17 2008 +0900 +++ b/TaskManager/Cell/CellBufferManager.cc Sun Feb 17 10:55:22 2008 +0900 @@ -6,18 +6,13 @@ void CellBufferManager::init(void) { - tlistImpl = new CellTaskListInfo; - tqueueImpl = new TaskQueueInfo; - htaskImpl = new HTaskInfo; + BufferManager::init(void); - tlistImpl->init(machineNum*2); - tqueueImpl->init(TASK_MAX_SIZE*4); - htaskImpl->init(TASK_MAX_SIZE*2); - - machineTaskList = new TaskListPtr[machineNum]; + cellTaskListImpl = new CellTaskListInfo; + machineTaskList = new TaskListPtr[machineNum]; for (int i = 0; i < machineNum; i++) { - machineTaskList[i] = tlistImpl->create(); + machineTaskList[i] = cellTaskListImpl->create(); } } @@ -27,8 +22,8 @@ { TaskQueuePtr q; - q = tqueueImpl->create(task); - activeTaskQueue = tqueueImpl->append(activeTaskQueue, q); + q = taskQueueImpl->create(task); + activeTaskQueue = taskQueueImpl->append(activeTaskQueue, q); } void @@ -36,8 +31,8 @@ { TaskQueuePtr q; - q = tqueueImpl->create(task); - waitTaskQueue = tqueueImpl->append(waitTaskQueue, q); + q = taskQueueImpl->create(task); + waitTaskQueue = taskQueueImpl->append(waitTaskQueue, q); } TaskListPtr @@ -52,8 +47,8 @@ if (list->length < TASK_MAX_SIZE) { return list; } else { - q = tlistImpl->create(); - machineTaskList[0] = tlistImpl->append(machineTaskList[0], q); + q = cellTaskListImpl->create(); + machineTaskList[0] = cellTaskListImpl->append(machineTaskList[0], q); return q; } } @@ -69,7 +64,7 @@ while (p) { p1 = p; p = p->next; - tlistImpl->free(p1); + cellTaskListImpl->free(p1); } } #endif