comparison TaskManager/kernel/ppe/TaskManagerImpl.cc @ 941:0c11c2fd7e63

add no_auto_free flag on HTask
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 31 Jul 2010 17:50:38 +0900
parents 0d404f6c36a8
children a9c7784e5dae
comparison
equal deleted inserted replaced
940:0d404f6c36a8 941:0c11c2fd7e63
92 */ 92 */
93 void 93 void
94 TaskManagerImpl::set_task_depend(HTaskPtr master, HTaskPtr slave) 94 TaskManagerImpl::set_task_depend(HTaskPtr master, HTaskPtr slave)
95 { 95 {
96 TaskQueuePtr m, s; 96 TaskQueuePtr m, s;
97 if (!master->self) return;
97 98
98 m = taskQueueImpl->create(master); 99 m = taskQueueImpl->create(master);
99 s = taskQueueImpl->create(slave); 100 s = taskQueueImpl->create(slave);
100 101
101 master->wait_me->addLast(s); 102 master->wait_me->addLast(s);
116 if (task->wait_i->empty()) { 117 if (task->wait_i->empty()) {
117 append_activeTask(task); 118 append_activeTask(task);
118 } else { 119 } else {
119 append_waitTask(task); 120 append_waitTask(task);
120 } 121 }
121
122 // systask_finish->wait_for(task);
123 } 122 }
124 123
125 124
126 /** 125 /**
127 * Task を実行可能キューに追加する 126 * Task を実行可能キューに追加する
192 // このfreeをコメントアウトしてみる。 191 // このfreeをコメントアウトしてみる。
193 192
194 // id かななんかでチェックした方が良いが... 193 // id かななんかでチェックした方が良いが...
195 194
196 me->self = 0; 195 me->self = 0;
197 htaskImpl->free_(me); 196 if (!me->flag.no_auto_free)
197 htaskImpl->free_(me);
198 } 198 }
199 199
200 /** 200 /**
201 * @brief 終了したタスクリストの依存の処理 201 * @brief 終了したタスクリストの依存の処理
202 * @param [task] 終了したタスク 202 * @param [task] 終了したタスク