annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #include "HTask.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #include "ListData.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #include "TaskManagerImpl.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 void
518
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
7 HTask::spawn()
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 mimpl->spawn_task(this);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11
293
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
12 /*!
297
f8006660a45c start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
13 @brief この Task が待ち合わせする Task を指定する
f8006660a45c start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
14 @param[in] master この Task が終了待ち合わせをする相手の Task
293
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
15
297
f8006660a45c start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
16 繰り返し使用する事で複数の Task を待ち合わせする事ができる。
293
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
17
297
f8006660a45c start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
18 wait_for している Task の入力バッファにこの Task から書き込みできる機能があると良い
293
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
19 */
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
20
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 void
293
9f4f99d459aa add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
22 HTask::wait_for(HTaskPtr master)
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 {
518
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
24 TaskQueuePtr m, s;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
25
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
26 m = wait_i->create(master);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
27 s = wait_i->create(this);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
28
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
29 master->wait_me->addLast(s);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
30 this->wait_i->addLast(m);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
31 s->waiter = m;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 507
diff changeset
32
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34