comparison TaskManager/kernel/schedule/SchedTask.cc @ 464:01b321c86747

task run is mere C function now.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 30 Sep 2009 10:12:26 +0900
parents bc5b3d327083
children 4fa8760e18c2
comparison
equal deleted inserted replaced
463:bc5b3d327083 464:01b321c86747
11 11
12 //#define NO_PIPELINE 12 //#define NO_PIPELINE
13 13
14 /** 14 /**
15 Task Object を作る 15 Task Object を作る
16 code loading ならば、loading の終了を待つ
17 */ 16 */
18 17
19 18
20 SchedTask * 19 SchedTask *
21 createSchedTask(Scheduler *scheduler, TaskPtr task) 20 createSchedTask(Scheduler *scheduler, TaskPtr task)
22 { 21 {
23 task_list[task->command].wait(scheduler,task->command); 22 return new SchedTask();
24 return task_list[task->command].creator(scheduler);
25 } 23 }
26 24
27 25
28 /** 26 /**
29 code load を始める。既に get_segment hash に入っていれば何もしない。 27 code load を始める。既に get_segment hash に入っていれば何もしない。
56 ex_read = &SchedTask::ex_read_normal; 54 ex_read = &SchedTask::ex_read_normal;
57 ex_exec = &SchedTask::ex_exec_normal; 55 ex_exec = &SchedTask::ex_exec_normal;
58 ex_write = &SchedTask::ex_write_normal; 56 ex_write = &SchedTask::ex_write_normal;
59 ex_next = &SchedTask::ex_next_normal; 57 ex_next = &SchedTask::ex_next_normal;
60 58
61 // run_func = &SchedTask::run;
62 run_func1 = &SchedTask::run;
63 } 59 }
64 60
65 /** 61 /**
66 * dma_store の wait を行う 62 * dma_store の wait を行う
67 * このタスクが RenewTask だった場合、 63 * このタスクが RenewTask だった場合、
192 { 188 {
193 __debug("[SchedTask:%s]\n", __FUNCTION__); 189 __debug("[SchedTask:%s]\n", __FUNCTION__);
194 190
195 #if !defined(NO_PIPELINE) 191 #if !defined(NO_PIPELINE)
196 __scheduler->dma_wait(DMA_READ); 192 __scheduler->dma_wait(DMA_READ);
193 task_list[__task->command].wait(__scheduler,__task->command);
197 #endif 194 #endif
198 195
199 //run(__readbuf, __writebuf); 196 task_list[__task->command].run(this, __readbuf, __writebuf);
200 // (this->*run_func)(__readbuf, __writebuf);
201 (this->*run_func1)(this, __readbuf, __writebuf);
202 197
203 free(__readbuf); 198 free(__readbuf);
204 199
205 if (__taskGroup->status() != 0) { 200 if (__taskGroup->status() != 0) {
206 __task->self = __taskGroup->command; 201 __task->self = __taskGroup->command;