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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
1 #include <stdlib.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
2 #include <string.h>
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
3 #include "SchedTaskList.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
6 #include "SchedNop2Ready.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
7 #include "DmaManager.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
8 #include "error.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
9
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
10 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
11 * SchedTaskList を返す
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
12 *
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
13 * @param[in] next_list 次の実行する TaskList のアドレス
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
14 * @param[in] next_list がメインメモリのアドレスか、
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
15 * SPE で生成されたアドレスかのフラグ
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
16 * SPE で生成されている場合、DMA の必要は無い
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
17 * 0: メインメモリ, 1: SPE
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
18 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
19
972
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 970
diff changeset
20 SchedTaskList::SchedTaskList(memaddr addr, Scheduler *sched, int tag)
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
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
44d9b08519e0 sched task fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1213
diff changeset
27 connector = scheduler->connector;
1417
70f461442b0f null DMA clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1219
diff changeset
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
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 970
diff changeset
32 this->tag = tag;
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 970
diff changeset
33
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
34 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
35
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
36
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
44 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
45
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
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
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
49
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
50 void
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
51 SchedTaskList::write()
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
52 {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
53 }
88
504899860e66 *** empty log message ***
gongo
parents: 42
diff changeset
54
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
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 */