annotate TaskManager/kernel/schedule/SchedTask.cc @ 736:1b225972ae88 draft

cut printf
author hiroki@localhost.localdomain
date Sun, 27 Dec 2009 20:39:33 +0900
parents e78238b7c5d6
children 55ccf5f6d9af
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
736
1b225972ae88 cut printf
hiroki@localhost.localdomain
parents: 718
diff changeset
1
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
2 #include <stdlib.h>
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
3 #include <string.h>
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
4 #include "SchedTask.h"
695
29bd0882272a TaskArray on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
5 #include "SysFunc.h"
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
6 #include "SchedTaskList.h"
695
29bd0882272a TaskArray on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
7 #include "SchedTaskArrayLoad.h"
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
8 #include "SchedNop2Ready.h"
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
9 #include "DmaManager.h"
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
10 #include "error.h"
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
11 #include "TaskManager.h"
466
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
12 #include <stdarg.h>
180
e3b7776b1420 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
13
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
14 #include "SchedTaskArray.h"
688
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 674
diff changeset
15 #define Task SimpleTask
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 674
diff changeset
16 #define TaskPtr SimpleTaskPtr
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 674
diff changeset
17
698
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
18 extern TaskObject task_list[MAX_TASK_OBJECT];
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
19
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
20
423
609758f9f350 Code load implementation... (not yet tested)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
21
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
22 SchedTask::SchedTask()
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
23 {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
24 list = NULL;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
25 task = NULL;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
26 readbuf = NULL;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
27 writebuf = NULL;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
28 scheduler = NULL;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
29 cur_index = 0;
466
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
30 this->stdout_ = stdout;
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
31 this->stderr_ = stderr;
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
32 this->stdin_ = stdin;
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
33
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
34
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
35 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
36
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
37 /**
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
38 * dma_store の wait を行う
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
39 */
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
40 SchedTask::~SchedTask()
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
41 {
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
42 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
43
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
44
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
45 void
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
46 SchedTask::init(TaskListPtr _list, TaskPtr _task, int index, Scheduler* sc)
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
47 {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
48 list = _list;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
49 task = _task;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
50 scheduler = sc;
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
51 cur_index = index;
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
52
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
53 scheduler->mainMem_wait();
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
54
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
55 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
56
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
57
502
fdc3e30de9d3 Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 501
diff changeset
58 void
fdc3e30de9d3 Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 501
diff changeset
59 SchedTask::read()
fdc3e30de9d3 Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 501
diff changeset
60 {
538
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
61 __debug("[SchedTask:%s]\n", __FUNCTION__);
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
62
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
63 // object creation をSchedTask生成時にやらないので、
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
64 // exec の直前のread で十分に間に合う
704
ec6c897448ca Compatibility mode works.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 703
diff changeset
65 loadSchedTask(scheduler, task->command);
713
97adb3fe85c6 remove SIMPLE_TASK conditional
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 708
diff changeset
66
634
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
67 // 読むデータが一つもなければ無視
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
68 if (task->r_size == 0) return;
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
69 // load Input Data
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
70 readbuf = scheduler->allocate(task->r_size);
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
71 scheduler->dma_load(readbuf, task->rbuf,task->r_size, DMA_READ);
538
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
72
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
73
502
fdc3e30de9d3 Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 501
diff changeset
74 }
fdc3e30de9d3 Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 501
diff changeset
75
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
76
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
77 void
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
78 SchedTask::exec()
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
79 {
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
80 __debug("[SchedTask:%s]\n", __FUNCTION__);
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
81
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
82 if (task->w_size > 0) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
83 writebuf = scheduler->allocate(task->w_size);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
84 }
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
85 scheduler->dma_wait(DMA_READ);
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
86 task_list[task->command].wait(scheduler,task->command);
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
87 task_list[task->command].run(this, readbuf, writebuf);
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
88 free(readbuf);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
89
547
e5431e658038 continue..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 546
diff changeset
90 // 書き込む領域がなければ無視
713
97adb3fe85c6 remove SIMPLE_TASK conditional
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 708
diff changeset
91
635
c56f6847fb87 SimpleTask worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 634
diff changeset
92 if (task->w_size > 0) {
637
20665e4060ea not yet worked...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 635
diff changeset
93 scheduler->dma_store(writebuf, task->wbuf,task->w_size, DMA_WRITE);
635
c56f6847fb87 SimpleTask worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 634
diff changeset
94 }
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
95 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
96
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
97 void
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
98 SchedTask::write()
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
99 {
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
100 __debug("[SchedTask:%s]\n", __FUNCTION__);
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
101
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
102 scheduler->dma_wait(DMA_WRITE);
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
103 free(writebuf);
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
104
625
94d82f2c842f 64bit mode worked on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
105 scheduler->mail_write((memaddr)task->self);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
106 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
107
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
108 SchedTaskBase*
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
109 SchedTask::next(Scheduler *scheduler, SchedTaskBase *p)
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
110 {
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
111 __debug("[SchedTask:%s]\n", __FUNCTION__);
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
112
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
113 if (cur_index < list->length) {
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
114 // Task List が残っているので、次を準備
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
115
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
116 TaskPtr nextTask = &list->tasks[cur_index++];
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
117 SchedTask *nextSched = new SchedTask();
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
118 nextSched->init(list, nextTask, cur_index, scheduler);
717
dfb3518d8694 TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
119 // この時点で、TaskList は down load が済んでないことがある
dfb3518d8694 TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
120 // 最初のTaskの種類に関しては、別な情報で渡す方が良い
dfb3518d8694 TaskList load timing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
121 // あるいはTaskListの最初には、TaskArray1/TaskArray を置かない?
713
97adb3fe85c6 remove SIMPLE_TASK conditional
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 708
diff changeset
122
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
123 if (nextTask->command==TaskArray1) {
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
124 // compatibility
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
125 return new SchedTaskArray(scheduler, nextSched);
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
126 }
695
29bd0882272a TaskArray on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
127 if (nextTask->command==TaskArray) {
29bd0882272a TaskArray on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
128 // Start Task Array
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
129 return new SchedTaskArrayLoad(scheduler, nextSched);
695
29bd0882272a TaskArray on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
130 }
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
131 return nextSched;
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
132 } else {
603
57ec231bc8ac long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 602
diff changeset
133 memaddr nextList = (memaddr)list->next;
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
134 if (nextList == 0) {
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
135 // もう何もする必要がない
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
136 return new SchedNop2Ready(scheduler);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
137 } else {
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
138 // 新しいリストに取り掛かる
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
139 return new SchedTaskList(nextList, scheduler);
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
140 }
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
141 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
142 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
143
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
144
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
145 int
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
146 SchedTask::get_cpuid()
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
147 {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
148 return scheduler->id;
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
149 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
150
708
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
151 void SchedTask::free_(void *p) {
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
152 scheduler->free_(p);
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
153 }
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 706
diff changeset
154
698
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
155
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
156 void* SchedTask::get_input(void *buff, int index) {
736
1b225972ae88 cut printf
hiroki@localhost.localdomain
parents: 718
diff changeset
157 scheduler->printf("Cannot use inData in SimpleTask use TaskArray\n");
698
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
158 return NULL; }
706
b2b4a1243961 no compile error on Cell. Regression Test.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
159 memaddr SchedTask::get_inputAddr(int index) { return 0; }
698
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
160 int SchedTask::get_inputSize(int index) {return 0; }
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
161 void* SchedTask::get_output(void *buff, int index) {return 0; }
706
b2b4a1243961 no compile error on Cell. Regression Test.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 704
diff changeset
162 memaddr SchedTask::get_outputAddr(int index) { return 0; }
698
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
163 int SchedTask::get_outputSize(int index) { return 0; }
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
164 memaddr SchedTask::get_param(int index) { return 0; }
72b2da99e875 no compile error for Task Array
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 695
diff changeset
165
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
166
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
167 void*
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
168 SchedTask::global_alloc(int id, int size) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
169 return scheduler->global_alloc(id, size);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
170 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
171
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
172 void*
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
173 SchedTask::global_get(int id) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
174 return scheduler->global_get(id);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
175 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
176
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
177 void
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
178 SchedTask::global_set(int id, void *addr) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
179 scheduler->global_set(id, addr);
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
180 }
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
181
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
182 void
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
183 SchedTask::global_free(int id) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
184 scheduler->global_free(id);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
185 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
186
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
187 MemList*
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
188 SchedTask::createMemList(int size, int count) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
189 return scheduler->createMemList(size, count);
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
190 }
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 356
diff changeset
191
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
192 void
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
193 SchedTask::mainMem_alloc(int id, int size) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
194 scheduler->mainMem_alloc(id, size);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
195 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
196
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
197 void
403
e2f29e912d0b clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 395
diff changeset
198 SchedTask::mainMem_wait() {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
199 scheduler->mainMem_wait();
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
200 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
201
631
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 625
diff changeset
202 memaddr
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
203 SchedTask::mainMem_get(int id) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
204 return scheduler->mainMem_get(id);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
205 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
206
467
839e34d0cc3c fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 466
diff changeset
207
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
208 void
625
94d82f2c842f 64bit mode worked on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
209 SchedTask::dma_load(void *buf, memaddr addr, uint32 size, uint32 mask) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
210 scheduler->dma_load(buf, addr, size, mask);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
211 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
212
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
213 void
625
94d82f2c842f 64bit mode worked on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
214 SchedTask::dma_store(void *buf,memaddr addr, uint32 size, uint32 mask) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
215 scheduler->dma_store(buf, addr, size, mask);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
216 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
217
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
218 void
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
219 SchedTask::dma_wait(uint32 mask) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
220 scheduler->dma_wait(mask);
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
221 }
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
222
334
7bc5cbc5fe04 [in test_render] push L key , call show_dma_wait, but incomplete.
e065746@localhost.localdomain
parents: 321
diff changeset
223 void
7bc5cbc5fe04 [in test_render] push L key , call show_dma_wait, but incomplete.
e065746@localhost.localdomain
parents: 321
diff changeset
224 SchedTask::show_dma_wait() {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
225 scheduler->show_dma_wait();
334
7bc5cbc5fe04 [in test_render] push L key , call show_dma_wait, but incomplete.
e065746@localhost.localdomain
parents: 321
diff changeset
226 }
7bc5cbc5fe04 [in test_render] push L key , call show_dma_wait, but incomplete.
e065746@localhost.localdomain
parents: 321
diff changeset
227
674
07351a5a51c9 fix many task example (sort).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
228 long
07351a5a51c9 fix many task example (sort).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
229 SchedTask::get_random() {
07351a5a51c9 fix many task example (sort).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
230 return scheduler->get_random();
07351a5a51c9 fix many task example (sort).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
231 }
07351a5a51c9 fix many task example (sort).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
232
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 643
diff changeset
233 void
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 643
diff changeset
234 SchedTask::start_profile() {
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 643
diff changeset
235 scheduler->start_profile();
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 643
diff changeset
236 }
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 643
diff changeset
237
387
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
238 MemorySegment * SchedTask::get_segment(memaddr addr, MemList *m) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
239 return scheduler->get_segment(addr,m);
387
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
240 }
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
241
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
242 void SchedTask::put_segment(MemorySegment *s) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
243 scheduler->put_segment(s);
387
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
244 }
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
245
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
246 void SchedTask::wait_segment(MemorySegment *s) {
483
5f4ffff2c2aa renew task worked. but not test_nogl...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 468
diff changeset
247 scheduler->wait_segment(s);
387
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
248 }
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
249
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
250
634
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
251 HTaskPtr
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
252 SchedTask::create_task(int cmd)
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
253 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
254 return scheduler->create_task(cmd);
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
255 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
256
634
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
257 HTaskPtr
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
258 SchedTask::create_task(int cmd, memaddr r, long rs, memaddr w, long ws)
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
259 {
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
260 return scheduler->create_task(cmd,r,rs,w,ws);
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
261 }
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
262
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
263
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
264 void SchedTask::set_task_depend(HTaskPtr master, HTaskPtr slave)
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
265 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
266 scheduler->set_task_depend(master, slave);
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
267 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
268
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
269 void SchedTask::spawn_task(HTaskPtr t)
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
270 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
271 scheduler->spawn_task(t);
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
272 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
273
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
274 void SchedTask::set_task_cpu(HTaskPtr t, CPU_TYPE cpu)
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
275 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
276 scheduler->set_task_cpu(t, cpu);
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
277 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
278
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
279 void* SchedTask::allocate(int size)
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
280 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
281 return scheduler->allocate(size) ;
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
282 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
283
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
284 void* SchedTask::allocate(int size,int align)
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
285 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
286 return scheduler->allocate(size,align) ;
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
287 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
288
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
289 Scheduler* SchedTask::get_scheduler()
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
290 {
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
291 return scheduler;
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
292 }
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
293
466
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
294 /* system call */
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
295
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
296 int
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
297 SchedTask::printf(const char * format, ...)
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
298 {
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
299 va_list ap;
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
300 va_start(ap,format);
736
1b225972ae88 cut printf
hiroki@localhost.localdomain
parents: 718
diff changeset
301 int ret= scheduler->vprintf(format, ap);
466
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
302 va_end(ap);
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
303 return ret;
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
304 }
c73aff02db67 prohibit global variable in Task....
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 464
diff changeset
305
387
b6fce69839b5 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
306
308
b85b920628e2 remove SchedTaskImpl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 302
diff changeset
307 /* end */