Mercurial > hg > Members > kono > Cerium
diff TaskManager/kernel/ppe/HTask.cc @ 518:125a72948e44
....
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Oct 2009 17:57:17 +0900 |
parents | 735f76483bb2 |
children | 5c76db2a07fa |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/HTask.cc Mon Oct 12 21:53:50 2009 +0900 +++ b/TaskManager/kernel/ppe/HTask.cc Fri Oct 16 17:57:17 2009 +0900 @@ -3,19 +3,8 @@ #include "TaskManagerImpl.h" -/*! - manager->set_task_depend(task1, task2); // task2 は task1 の終了を待つ - - ってやるより - - task2->set_depend(task1); - - ってやったほうがわかりやすいよねー的な話し合いで - 下のようなAPIを作りました -*/ - void -HTask::spawn(void) +HTask::spawn() { mimpl->spawn_task(this); } @@ -32,19 +21,14 @@ void HTask::wait_for(HTaskPtr master) { - mimpl->set_task_depend(master, this); + TaskQueuePtr m, s; + + m = wait_i->create(master); + s = wait_i->create(this); + + master->wait_me->addLast(s); + this->wait_i->addLast(m); + s->waiter = m; + } -void -HTask::set_cpu(CPU_TYPE type) -{ -{ - mimpl->set_task_cpu(this, type); -} - -void -set_post(PostFunction func,void *read, void *write) - this->post_func = func; - this->post_arg1 = read; - this->post_arg2 = write; -}