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