annotate TaskManager/kernel/schedule/SchedTask.cc @ 194:b56fb6ac2fc4 draft

fix
author gongo@localhost.localdomain
date Tue, 20 Jan 2009 14:50:41 +0900
parents e9b5dcdae38d
children 305ac1897c50
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
1 #include <stdlib.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
2 #include <string.h>
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
3 #include "SchedTask.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
4 #include "SchedTaskList.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
5 #include "SchedNop2Ready.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
6 #include "DmaManager.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
7 #include "error.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
8 #include "TaskManager.h"
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
9
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
10 extern Scheduler::TaskObject task_list[MAX_TASK_OBJECT];
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
11
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
12 SchedTask*
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
13 createSchedTask(TaskPtr task)
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
14 {
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
15 return task_list[task->command]();
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
16 }
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
17
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
18 SchedTask::SchedTask(void)
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
19 {
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
20 __list = NULL;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
21 __task = NULL;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
22 __inListData = NULL;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
23 __outListData = NULL;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
24 __readbuf = NULL;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
25 __writebuf = NULL;
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
26 __scheduler = NULL;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
27 __taskGroup = NULL;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
28 __renew_flag = 0;
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
29 __cur_index = 0;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
30 __flag_renewTask = SCHED_TASK_NORMAL;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
31
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
32 ex_init = &SchedTask::ex_init_normal;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
33 ex_read = &SchedTask::ex_read_normal;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
34 ex_exec = &SchedTask::ex_exec_normal;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
35 ex_write = &SchedTask::ex_write_normal;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
36 ex_next = &SchedTask::ex_next_normal;
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
37 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
38
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
39 SchedTask::~SchedTask(void)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
40 {
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
41 if (__flag_renewTask == SCHED_TASK_RENEW) {
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
42 /**
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
43 * __inListData と __outListData はタスク自身のものなので
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
44 * 終わったら即 free する。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
45 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
46 free(__inListData);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
47 free(__outListData);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
48
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
49 /**
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
50 * __list != NULL の場合、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
51 * この Task が __list の最後の Task になるので (SchedTask::next 参照)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
52 * このタイミングで __list を解放する
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
53 * (free に渡されるアドレスが正しいものとなる)。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
54 * それ以外の Task では当然解放しない。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
55 * __list == NULL なので、free に渡しても無問題
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
56 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
57 free(__list);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
58 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
59
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
60 delete smanager;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
61 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
62
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
63 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
64 * このタスクを Renew Task とし、それに応じた関数をセットする
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
65 */
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
66 void
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
67 SchedTask::__setRenew(void)
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
68 {
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
69 __flag_renewTask = SCHED_TASK_RENEW;
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
70
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
71 ex_init = &SchedTask::ex_init_renew;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
72 ex_read = &SchedTask::ex_read_renew;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
73 ex_exec = &SchedTask::ex_exec_renew;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
74 ex_write = &SchedTask::ex_write_renew;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
75 ex_next = &SchedTask::ex_next_renew;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
76 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
77
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
78 void
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
79 SchedTask::__init__(TaskListPtr _list, TaskPtr _task, int index,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
80 ListDataPtr rbuf, ListDataPtr wbuf, Scheduler* sc)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
81 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
82 __list = _list;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
83 __task = _task;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
84 __inListData = rbuf;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
85 __outListData = wbuf;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
86 __scheduler = sc;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
87 __cur_index = index;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
88
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
89 smanager = new STaskManager(this);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
90
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
91 __scheduler->mainMem_wait();
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
92
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
93 (this->*ex_init)();
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
94 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
95
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
96 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
97 * PPE 内で生成されたタスクの ex_init()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
98 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
99 void
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
100 SchedTask::ex_init_normal(void)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
101 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
102 __scheduler->dma_load(__inListData, (uint32)__task->inData,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
103 sizeof(ListData), DMA_READ_IN_LIST);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
104 __scheduler->dma_load(__outListData, (uint32)__task->outData,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
105 sizeof(ListData), DMA_READ_OUT_LIST);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
106
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
107 __taskGroup = new TaskGroup;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
108 __taskGroup->command = __task->self;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
109 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
110
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
111 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
112 * SPE 内で生成されたタスクの ex_init()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
113 * 各データは SPE 内の create_task 時に生成もしくは引き継がれているので
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
114 * ex_init_normal() と違い、ここでは値を渡すだけ
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
115 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
116 void
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
117 SchedTask::ex_init_renew(void)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
118 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
119 __inListData = __task->inData;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
120 __outListData = __task->outData;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
121 __taskGroup = (TaskGroupPtr)__task->self;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
122 }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
123
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
124 /**
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
125 * [Todo]
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
126 * データの読み込み場所を readbuf ではなく、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
127 * ユーザ自身で決めれるようになるといいかもしれない。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
128 *
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
129 * # TaskManager が勝手に消すことなく、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
130 * # ユーザが SPE 上に持ち続けることができるため。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
131 * # もちろん管理はユーザに任せるわけだ。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
132 */
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
133 void
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
134 SchedTask::read(void)
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
135 {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
136 __debug("[SchedTask:%s]\n", __FUNCTION__);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
137
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
138 // wait for load inListData
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
139 __scheduler->dma_wait(DMA_READ_IN_LIST);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
140
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
141 // 読むデータが一つもなければ無視
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
142 if (__inListData->length < 1 || __inListData->size == 0) return;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
143
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
144 // load Input Data
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
145 __readbuf = __scheduler->allocate(__inListData->size);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
146 __scheduler->dma_loadList(__inListData, __readbuf, DMA_READ);
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
147
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
148 (this->*ex_read)();
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
149 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
150
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
151 void
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
152 SchedTask::exec(void)
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
153 {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
154 __debug("[SchedTask:%s]\n", __FUNCTION__);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
155
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
156 // wait for load outListData
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
157 __scheduler->dma_wait(DMA_READ_OUT_LIST);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
158 __writebuf = __scheduler->allocate(__outListData->size);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
159
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
160 __debug(" task->command = %d\n", __task->command);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
161 __debug(" task->in_size = %d\n", __task->in_size);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
162 __debug(" task->in_addr = 0x%x\n", __task->in_addr);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
163 __debug(" task->out_addr = 0x%x\n", __task->out_addr);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
164 __debug(" list->next = 0x%x\n", (unsigned int)__list->next);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
165 __debug(" list->length = 0x%x\n", (unsigned int)__list->length);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
166
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
167 __scheduler->dma_wait(DMA_READ);
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
168
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
169 run(__readbuf, __writebuf);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
170
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
171 free(__readbuf);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
172
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
173 if (__taskGroup->status() != 0) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
174 __task->self = __taskGroup->command;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
175 delete __taskGroup;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
176 __taskGroup = NULL;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
177 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
178
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
179 // 書き込む領域が要らなければ無視
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
180 if (__outListData->size > 0 || __outListData->length > 0) {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
181 __scheduler->dma_storeList(__outListData, __writebuf, DMA_WRITE);
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
182 // SchedTask::write(void) でも wait 掛けてるんだけど、
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
183 // 実際にはここに wait しないとちゃんと書き込まれてない感じがする
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
184 // wait はされてるはずなんだがなー
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
185 __scheduler->dma_wait(DMA_WRITE);
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
186 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
187
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
188 (this->*ex_exec)();
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
189 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
190
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
191 void
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
192 SchedTask::write(void)
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
193 {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
194 __debug("[SchedTask:%s]\n", __FUNCTION__);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
195
194
gongo@localhost.localdomain
parents: 187
diff changeset
196 __scheduler->dma_wait(DMA_WRITE);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
197 free(__writebuf);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
198
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
199 /**
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
200 * このタスクはSPE内で生成されたが、
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
201 * このタスクの終了を待つ必要はない、という設定がされているため、
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
202 * (wait_task() が呼ばれていない)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
203 * ここで終了する。ex_write は実行しない
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
204 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
205 if (__task->self == MY_SPE_NOP) return;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
206
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
207 (this->*ex_write)();
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
208 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
209
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
210 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
211 * PPE 内で生成されたタスクの ex_read()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
212 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
213 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
214 SchedTask::ex_read_normal(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
215 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
216 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
217
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
218 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
219 * SPE 内で生成されたタスクの ex_read()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
220 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
221 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
222 SchedTask::ex_read_renew(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
223 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
224 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
225
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
226 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
227 * PPE 内で生成されたタスクの ex_exec()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
228 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
229 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
230 SchedTask::ex_exec_normal(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
231 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
232 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
233
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
234 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
235 * SPE 内で生成されたタスクの ex_exec()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
236 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
237 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
238 SchedTask::ex_exec_renew(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
239 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
240 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
241
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
242
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
243
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
244 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
245 * PPE 内で生成されたタスクの ex_write()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
246 *
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
247 * このタスク内で新たにタスクが生成され、
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
248 * 且つそのタスクの終了を待つ必要がある場合、
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
249 * PPE に終了したことは知らせない(command は送信しない)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
250 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
251 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
252 SchedTask::ex_write_normal(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
253 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
254 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
255 * このタスク内で新たにタスクが生成されなかった
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
256 * or 生成されたが、そのタスクの終了を待つ必要は無い
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
257 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
258 if (__renew_flag == 0) {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
259 __scheduler->mail_write(__task->self);
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
260 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
261 }
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
262
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
263 /**
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
264 * SPE 内で生成されたタスクの ex_write()
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
265 *
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
266 * A <- 親タスク
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
267 * | \
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
268 * B C <- SPE 内で生成されたタスク
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
269 *
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
270 * A は SPE 内で B, C を生成したとする。
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
271 * B と C が終了したら、A が PPE に送るはずだったコマンドが
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
272 * 子タスクに引き継がれているので、最後に実行された子タスクが
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
273 * PPE に mail 送信する。
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
274 */
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
275 void
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
276 SchedTask::ex_write_renew(void)
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
277 {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
278 uint32 cmd;
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
279
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
280 __taskGroup->remove(__task);
182
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
281 cmd = __taskGroup->status();
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
282
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
283 // タスク内で作られた全てのタスクが終了した
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
284 if (cmd != 0) {
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
285 delete __taskGroup;
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
286 __scheduler->mail_write(cmd);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
287 }
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
288 }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
289
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
290 SchedTaskBase*
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
291 SchedTask::next(Scheduler *m, SchedTaskBase *p)
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
292 {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
293 __debug("[SchedTask:%s]\n", __FUNCTION__);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
294
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
295 delete p;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
296
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
297 return (this->*ex_next)();
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
298 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
299
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
300 SchedTaskBase*
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
301 SchedTask::ex_next_normal(void)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
302 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
303 if (__cur_index < __list->length) {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
304 SchedTaskBase *nextSched;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
305
187
gongo@localhost.localdomain
parents: 184
diff changeset
306 nextSched = __scheduler->get_nextRenewTaskList();
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
307
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
308 // RenewTask がある
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
309 if (nextSched) {
187
gongo@localhost.localdomain
parents: 184
diff changeset
310 __scheduler->set_backupTaskList(__list);
gongo@localhost.localdomain
parents: 184
diff changeset
311 __scheduler->set_backupTaskListIndex(__cur_index);
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
312 return nextSched;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
313 } else {
187
gongo@localhost.localdomain
parents: 184
diff changeset
314 TaskPtr nextTask = &__list->tasks[__cur_index++];
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
315 nextSched = createSchedTask(nextTask);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
316 ((SchedTask*)nextSched)->__init__(__list, nextTask, __cur_index,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
317 __scheduler->get_curReadBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
318 __scheduler->get_curWriteBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
319 __scheduler);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
320 return nextSched;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
321 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
322 } else {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
323 uint32 nextList = (uint32)__list->next;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
324
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
325 if (nextList == 0) {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
326 return new SchedNop2Ready(__scheduler);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
327 } else {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
328 return createSchedTaskList(nextList, __scheduler,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
329 SCHED_TASKLIST_NORMAL);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
330 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
331 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
332 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
333
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
334 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
335 *
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
336 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
337 SchedTaskBase*
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
338 SchedTask::ex_next_renew(void)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
339 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
340 TaskPtr nextTask;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
341 SchedTask *nextSched;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
342
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
343 if (__cur_index < __list->length) {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
344 nextTask = &__list->tasks[__cur_index++];
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
345 nextSched = createSchedTask(nextTask);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
346
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
347 // RenewTaskList を実行中なので
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
348 nextSched->__setRenew();
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
349 nextSched->__init__(__list, nextTask, __cur_index,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
350 __scheduler->get_curReadBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
351 __scheduler->get_curWriteBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
352 __scheduler);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
353
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
354 /**
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
355 * この理由は SchedTask:~SchedTask() で
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
356 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
357 __list = NULL;
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
358 return nextSched;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
359 } else {
187
gongo@localhost.localdomain
parents: 184
diff changeset
360 SchedTaskBase *nextList;
gongo@localhost.localdomain
parents: 184
diff changeset
361
gongo@localhost.localdomain
parents: 184
diff changeset
362 nextList = __scheduler->get_nextRenewTaskList();
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
363
187
gongo@localhost.localdomain
parents: 184
diff changeset
364 if (nextList) {
gongo@localhost.localdomain
parents: 184
diff changeset
365 return nextList;
gongo@localhost.localdomain
parents: 184
diff changeset
366 } else {
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
367 TaskListPtr nextList = __scheduler->get_backupTaskList();
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
368
187
gongo@localhost.localdomain
parents: 184
diff changeset
369 // 中断した TaskList がある
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
370 if (nextList) {
187
gongo@localhost.localdomain
parents: 184
diff changeset
371 __cur_index = __scheduler->get_backupTaskListIndex();
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
372
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
373 nextTask = &nextList->tasks[__cur_index++];
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
374 nextSched = createSchedTask(nextTask);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
375
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
376 nextSched->__init__(nextList, nextTask, __cur_index,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
377 __scheduler->get_curReadBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
378 __scheduler->get_curWriteBuf(),
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
379 __scheduler);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
380 return nextSched;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
381 } else {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
382 return new SchedNop2Ready(__scheduler);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
383 }
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
384 }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
385 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
386 }
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
387
194
gongo@localhost.localdomain
parents: 187
diff changeset
388 int
gongo@localhost.localdomain
parents: 187
diff changeset
389 SchedTask::get_cpuid(void)
gongo@localhost.localdomain
parents: 187
diff changeset
390 {
gongo@localhost.localdomain
parents: 187
diff changeset
391 return __scheduler->id;
gongo@localhost.localdomain
parents: 187
diff changeset
392 }
gongo@localhost.localdomain
parents: 187
diff changeset
393
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
394 /**
182
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
395 * task->add_inData で与えられた順番に対応する index (0〜n-1) で、
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
396 * buffer から対応するデータを返す。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
397 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
398 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
399 SchedTask::get_input(void *buff, int index)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
400 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
401 if (buff != NULL) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
402 return (void*)((int)buff + __inListData->bound[index]);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
403 } else {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
404 return NULL;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
405 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
406 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
407
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
408 /**
182
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
409 * get_input(index) のアドレスを返す
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
410 */
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
411 uint32
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
412 SchedTask::get_inputAddr(int index)
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
413 {
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
414 return __inListData->element[index].addr;
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
415 }
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
416
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
417 /**
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
418 * get_input(index) のサイズを返す
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
419 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
420 int
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
421 SchedTask::get_inputSize(int index)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
422 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
423 return __inListData->element[index].size;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
424 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
425
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
426 /**
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
427 * write buffer の領域を返す。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
428 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
429 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
430 SchedTask::get_output(void *buff, int index)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
431 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
432 if (buff != NULL) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
433 return (void*)((int)buff + __outListData->bound[index]);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
434 } else {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
435 return NULL;
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
436 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
437 }
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
438
182
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
439 /**
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
440 * get_output(index) のアドレスを返す
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
441 */
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
442 uint32
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
443 SchedTask::get_outputAddr(int index)
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
444 {
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
445 return __outListData->element[index].addr;
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
446 }
8e9ada0c1ed0 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
447
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
448 /**
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
449 * get_output(index) のサイズを返す
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
450 */
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
451 int
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
452 SchedTask::get_outputSize(int index)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
453 {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
454 return __outListData->element[index].size;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
455 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
456
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
457 int
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
458 SchedTask::get_param(int index)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
459 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
460 return __task->param[index];
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
461 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
462
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
463 TaskPtr
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
464 SchedTask::create_task(int cmd)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
465 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
466 TaskListPtr taskList = __scheduler->get_renewListBuf();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
467 TaskPtr p = &taskList->tasks[taskList->length++];
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
468 p->command = cmd;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
469
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
470 p->inData = (ListData*)__scheduler->allocate(sizeof(ListData));
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
471 p->outData = (ListData*)__scheduler->allocate(sizeof(ListData));
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
472
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
473 p->inData->clear();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
474 p->outData->clear();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
475
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
476 p->self = MY_SPE_NOP;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
477 p->param_size = 0;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
478
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
479 return p;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
480 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
481
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
482 /**
180
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
483 * 生成したタスクが終了してから、メインスケジューラ(PPE) に
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
484 * タスクが終了した旨を知らせる。
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
485 *
e3b7776b1420 fix 荅潟 TaskManager/Changelogtest_render/Changelog
gongo@localhost.localdomain
parents: 109
diff changeset
486 * @param[in] waitTask タスク内で生成したタスク
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
487 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
488 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
489 SchedTask::wait_task(TaskPtr waitTask)
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
490 {
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
491 waitTask->self = (uint32)__taskGroup;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
492
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
493 __scheduler->add_groupTask(__taskGroup, waitTask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
494
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
495 __renew_flag++;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
496 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
497
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
498 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
499 SchedTask::global_alloc(int id, int size) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
500 return __scheduler->global_alloc(id, size);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
501 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
502
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
503 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
504 SchedTask::global_get(int id) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
505 return __scheduler->global_get(id);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
506 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
507
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
508 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
509 SchedTask::global_free(int id) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
510 __scheduler->global_free(id);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
511 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
512
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
513 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
514 SchedTask::mainMem_alloc(int id, int size) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
515 __scheduler->mainMem_alloc(id, size);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
516 }
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
517
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
518 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
519 SchedTask::mainMem_wait(void) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
520 __scheduler->mainMem_wait();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
521 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
522
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
523 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
524 SchedTask::mainMem_get(int id) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
525 return __scheduler->mainMem_get(id);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
526 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
527
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
528 void*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
529 SchedTask::allocate(int size) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
530 return __scheduler->allocate(size);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
531 }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
532
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
533 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
534 SchedTask::dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
535 __scheduler->dma_load(buf, addr, size, mask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
536 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
537
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
538 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
539 SchedTask::dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
540 __scheduler->dma_store(buf, addr, size, mask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
541 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
542
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
543 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
544 SchedTask::dma_wait(uint32 mask) {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
545 __scheduler->dma_wait(mask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
546 }