Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/schedule/SchedTaskList.cc @ 2069:26aa08c9a1de draft default tip
cuda example fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Feb 2017 10:04:55 +0900 |
parents | f82bb7393c4d |
children |
rev | line source |
---|---|
109 | 1 #include <stdlib.h> |
2 #include <string.h> | |
42 | 3 #include "SchedTaskList.h" |
4 #include "SchedTask.h" | |
704
ec6c897448ca
Compatibility mode works.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
5 #include "SysFunc.h" |
42 | 6 #include "SchedNop2Ready.h" |
7 #include "DmaManager.h" | |
8 #include "error.h" | |
9 | |
184 | 10 /** |
11 * SchedTaskList を返す | |
12 * | |
13 * @param[in] next_list 次の実行する TaskList のアドレス | |
14 * @param[in] next_list がメインメモリのアドレスか、 | |
15 * SPE で生成されたアドレスかのフラグ | |
16 * SPE で生成されている場合、DMA の必要は無い | |
17 * 0: メインメモリ, 1: SPE | |
18 */ | |
19 | |
972 | 20 SchedTaskList::SchedTaskList(memaddr addr, Scheduler *sched, int tag) |
42 | 21 { |
717
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
22 // next() で生成された時に、Task List read を始める |
1464
3f2230d79eba
TaskList no compile errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1417
diff
changeset
|
23 memaddr params_addr = addr; |
3f2230d79eba
TaskList no compile errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1417
diff
changeset
|
24 // should check TaskList size Todo |
109 | 25 scheduler = sched; |
717
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
26 list = scheduler->get_curListBuf(); |
1214 | 27 connector = scheduler->connector; |
1417 | 28 list = (TaskListPtr)connector->dma_load1(list, params_addr, |
717
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
29 sizeof(TaskList), DMA_READ_TASKLIST); |
1467
d585a7614cd5
look like working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1466
diff
changeset
|
30 cur_index = 0; |
970
1a4849b2acad
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
e2f29e912d0b
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
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
40 // next() で TaskListの中身を見られてしまうので、 |
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
41 // ここで DMA 待ちを行う |
1943
f82bb7393c4d
fix debug function
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
1467
diff
changeset
|
42 __debug(this->scheduler, "[SchedTaskList:%s]\n", __FUNCTION__); |
1213
a49c02dffe6f
DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
972
diff
changeset
|
43 connector->dma_wait(DMA_READ_TASKLIST); |
42 | 44 } |
45 | |
708 | 46 void |
717
dfb3518d8694
TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
709
diff
changeset
|
47 SchedTaskList::exec() { |
dfb3518d8694
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 |
708 | 55 |
403
e2f29e912d0b
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
56 /* end */ |