Mercurial > hg > Game > Cerium
changeset 93:dd33ec2e51b9
*** empty log message ***
author | gongo |
---|---|
date | Thu, 28 Feb 2008 17:32:18 +0900 |
parents | 663bc2a213f5 |
children | 588ab5f0e659 |
files | TaskManager/kernel/ppe/BufferManager.cc TaskManager/kernel/ppe/TaskQueueInfo.cc include/TaskManager/BufferManager.h |
diffstat | 3 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/BufferManager.cc Thu Feb 28 10:45:40 2008 +0900 +++ b/TaskManager/kernel/ppe/BufferManager.cc Thu Feb 28 17:32:18 2008 +0900 @@ -85,8 +85,8 @@ BufferManager::notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list) { TaskQueuePtr p; - HTaskPtr task; - + HTaskPtr task; + p = list; // wait task list while (p) { @@ -98,6 +98,21 @@ } p = p->next; } + + remove_taskQueue_all(list); +} + +void +BufferManager::remove_taskQueue_all(TaskQueuePtr list) +{ + TaskQueuePtr p = list; + TaskQueuePtr p1; + + while (p != NULL) { + p1 = p->next; + taskQueueImpl->free(p); + p = p1; + } } TaskQueuePtr
--- a/TaskManager/kernel/ppe/TaskQueueInfo.cc Thu Feb 28 10:45:40 2008 +0900 +++ b/TaskManager/kernel/ppe/TaskQueueInfo.cc Thu Feb 28 17:32:18 2008 +0900 @@ -21,6 +21,9 @@ { TaskQueuePtr q = NULL; + static int i = 0; + printf("extend %d\n", ++i); + q = (TaskQueuePtr)malloc(sizeof(TaskQueue)*(num+1)); if (q == NULL) { @@ -43,6 +46,10 @@ TaskQueueInfo::create(HTaskPtr task) { TaskQueuePtr q; + + static int i = 0; + + printf("create %d\n", ++i); if (freeTaskQueue == NULL) { extend_pool(100); @@ -60,6 +67,11 @@ void TaskQueueInfo::free(TaskQueuePtr q) { + static int i = 0; + + printf("free %d\n", ++i); + printf("## command %d ##\n", q->task->command); + q->next = freeTaskQueue; freeTaskQueue = q; }
--- a/include/TaskManager/BufferManager.h Thu Feb 28 10:45:40 2008 +0900 +++ b/include/TaskManager/BufferManager.h Thu Feb 28 17:32:18 2008 +0900 @@ -64,6 +64,7 @@ void notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list); TaskQueuePtr remove_taskQueue(TaskQueuePtr list, TaskQueuePtr task); TaskQueuePtr remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task); + void remove_taskQueue_all(TaskQueuePtr list); private: };