Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/schedule/SchedTaskList.cc @ 1025:cb170249c752
minor fix
author | yutaka@localhost.localdomain |
---|---|
date | Mon, 08 Nov 2010 14:40:53 +0900 |
parents | d093d601fc14 |
children |
rev | line source |
---|---|
109 | 1 #include <stdlib.h> |
2 #include <string.h> | |
42 | 3 #include "SchedTaskList.h" |
4 #include "SchedTask.h" | |
704
6d497c098455
Compatibility mode works.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
5 #include "SysFunc.h" |
6d497c098455
Compatibility mode works.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
6 #include "SchedTaskArray.h" |
6d497c098455
Compatibility mode works.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
7 #include "SchedTaskArrayLoad.h" |
42 | 8 #include "SchedNop2Ready.h" |
9 #include "DmaManager.h" | |
10 #include "error.h" | |
11 | |
184 | 12 /** |
13 * SchedTaskList を返す | |
14 * | |
15 * @param[in] next_list 次の実行する TaskList のアドレス | |
16 * @param[in] next_list がメインメモリのアドレスか、 | |
17 * SPE で生成されたアドレスかのフラグ | |
18 * SPE で生成されている場合、DMA の必要は無い | |
19 * 0: メインメモリ, 1: SPE | |
20 */ | |
21 | |
972 | 22 SchedTaskList::SchedTaskList(memaddr addr, Scheduler *sched, int tag) |
42 | 23 { |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
24 // next() で生成された時に、Task List read を始める |
42 | 25 params_addr = addr; |
109 | 26 scheduler = sched; |
708 | 27 cur_index = 0; |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
28 list = scheduler->get_curListBuf(); |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
29 scheduler->dma_load(list, params_addr, |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
30 sizeof(TaskList), DMA_READ_TASKLIST); |
970
33630c6ff445
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
717
diff
changeset
|
31 |
972 | 32 this->tag = tag; |
33 | |
42 | 34 } |
35 | |
109 | 36 |
42 | 37 void |
403
8611780d479f
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
38 SchedTaskList::read() |
42 | 39 { |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
40 // next() で TaskListの中身を見られてしまうので、 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
41 // ここで DMA 待ちを行う |
42 | 42 __debug("[SchedTaskList:%s]\n", __FUNCTION__); |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
43 scheduler->dma_wait(DMA_READ_TASKLIST); |
42 | 44 } |
45 | |
708 | 46 void |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
47 SchedTaskList::exec() { |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
48 } |
708 | 49 |
50 void | |
51 SchedTaskList::write() | |
42 | 52 { |
53 } | |
88 | 54 |
709 | 55 /** |
56 * next は、SchedTask のものが使われる。 | |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
57 * それで正しく動くはず。 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
58 * |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
59 * next() が呼ばれた時点で、TaskList のloadが終了しているように工夫する。 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
60 * |
709 | 61 */ |
708 | 62 |
403
8611780d479f
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
63 /* end */ |