Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/ppe/BufferManager.cc @ 70:178459e03f5c
*** empty log message ***
author | gongo |
---|---|
date | Mon, 18 Feb 2008 01:13:00 +0900 |
parents | 54355e641172 |
children | 83b57e03d3ef |
comparison
equal
deleted
inserted
replaced
69:c9b973f0673e | 70:178459e03f5c |
---|---|
60 delete taskListImpl; | 60 delete taskListImpl; |
61 delete taskQueueImpl; | 61 delete taskQueueImpl; |
62 delete htaskImpl; | 62 delete htaskImpl; |
63 } | 63 } |
64 | 64 |
65 /** | |
66 * waitTaskList って別で持つ必要あるのかな。 | |
67 * ここでいう wait ってのは依存のことで、 | |
68 * 依存される? task はすでにこの task を持っているわけだから。 | |
69 * わざわざ waitTaskList を持つ必要は無い。 | |
70 * けど、OS とかだと依存とかじゃない wait もあるんだよな。 | |
71 * 消す必要は無いか。 | |
72 */ | |
73 void | 65 void |
74 BufferManager::append_waitTask(HTaskPtr task) | 66 BufferManager::append_waitTask(HTaskPtr task) |
75 { | 67 { |
76 //TaskQueuePtr q; | 68 TaskQueuePtr q; |
77 | 69 |
78 //q = taskQueueImpl->create(task); | 70 q = taskQueueImpl->create(task); |
79 //waitTaskQueue = taskQueueImpl->append(waitTaskQueue, q); | 71 waitTaskQueue = taskQueueImpl->append(waitTaskQueue, q); |
80 } | 72 } |
81 | 73 |
82 void | 74 void |
83 BufferManager::check_task_finish(HTaskPtr task) | 75 BufferManager::check_task_finish(HTaskPtr task) |
84 { | 76 { |
89 } | 81 } |
90 | 82 |
91 void | 83 void |
92 BufferManager::notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list) | 84 BufferManager::notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list) |
93 { | 85 { |
94 TaskQueuePtr p, d; | 86 TaskQueuePtr p; |
95 HTaskPtr task; | 87 HTaskPtr task; |
96 | 88 |
97 p = list; // wait task list | 89 p = list; // wait task list |
98 | 90 |
99 while (p) { | 91 while (p) { |
100 task = p->task; | 92 task = p->task; |
101 task->wait_i = remove_taskQueue_eq_task(task->wait_i, depend); | 93 task->wait_i = remove_taskQueue_eq_task(task->wait_i, depend); |
102 if (task->wait_i == NULL) { | 94 if (task->wait_i == NULL) { |
103 d = p; | |
104 p = p->next; | |
105 append_activeTask(task); | 95 append_activeTask(task); |
106 //waitTaskQueue = remove_taskQueue(waitTaskQueue, d); | 96 waitTaskQueue = remove_taskQueue_eq_task(waitTaskQueue, task); |
107 } else { | |
108 p = p->next; | |
109 } | 97 } |
98 p = p->next; | |
110 } | 99 } |
111 } | 100 } |
112 | 101 |
113 TaskQueuePtr | 102 TaskQueuePtr |
114 BufferManager::remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task) | 103 BufferManager::remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task) |