Mercurial > hg > Members > kono > Cerium
diff TaskManager/kernel/ppe/TaskManagerImpl.cc @ 940:0d404f6c36a8
unknown dead lock still...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 31 Jul 2010 16:44:10 +0900 |
parents | 9cfac2e8fc2e |
children | 0c11c2fd7e63 |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc Sat Jul 31 12:18:19 2010 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc Sat Jul 31 16:44:10 2010 +0900 @@ -147,6 +147,20 @@ task->cpu_type = type; } +#if 0 +static void +check_wait(TaskManagerImpl *tm, TaskQueueInfo *wait_i) { + for(TaskQueue *t = wait_i->getFirst(); t; t = wait_i->getNext(t)) { + if (!tm->waitTaskQueue->find(t->task)) { + printf("stray waiting task%d %lx\n",t->task->command, (long)t->task); + } else if (tm->activeTaskQueue->find(t->task)) { + printf(" active task%d in waiting queue %lx\n",t->task->command, (long)t->task); + } else + printf("."); + } +} +#endif + /** * @brief 終了したタスクから依存の処理とか * post_func() はこのタスクが終了したら実行する関数。 @@ -156,9 +170,6 @@ void TaskManagerImpl::check_task_finish(HTaskPtr me, HTaskInfo *wait_queue) { - if (me->self == 0) - printf(" wait for zombi! %ld\n",(long)me); - while(TaskQueue *p = me->wait_me->poll()) { HTaskPtr you = p->task; TaskQueueInfo *wait_i = you->wait_i; @@ -172,7 +183,7 @@ append_activeTask(you); } - wait_i->free_(p); + wait_i->free_(p); // p->wait_i, p->wait_me は再利用される } // me を誰かが持っていて、me が finish した後に、