Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/schedule/SchedTaskList.cc @ 717:4c12f679a0fa
TaskList load timing...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Dec 2009 12:17:31 +0900 |
parents | 8ab63ded2c3f |
children | 33630c6ff445 |
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 | |
625
60aa3f241b10
64bit mode worked on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
619
diff
changeset
|
22 SchedTaskList::SchedTaskList(memaddr addr, Scheduler *sched) |
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); |
42 | 31 } |
32 | |
109 | 33 |
42 | 34 void |
403
8611780d479f
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
35 SchedTaskList::read() |
42 | 36 { |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
37 // next() で TaskListの中身を見られてしまうので、 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
38 // ここで DMA 待ちを行う |
42 | 39 __debug("[SchedTaskList:%s]\n", __FUNCTION__); |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
40 scheduler->dma_wait(DMA_READ_TASKLIST); |
42 | 41 } |
42 | |
708 | 43 void |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
44 SchedTaskList::exec() { |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
45 } |
708 | 46 |
47 void | |
48 SchedTaskList::write() | |
42 | 49 { |
50 } | |
88 | 51 |
709 | 52 /** |
53 * next は、SchedTask のものが使われる。 | |
717
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
54 * それで正しく動くはず。 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
55 * |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
56 * next() が呼ばれた時点で、TaskList のloadが終了しているように工夫する。 |
4c12f679a0fa
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
57 * |
709 | 58 */ |
708 | 59 |
403
8611780d479f
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
60 /* end */ |