Mercurial > hg > Game > Cerium
diff TaskManager/kernel/schedule/SchedTaskList.cc @ 708:d41c62201b1e draft
cleean up SchedTasks.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Dec 2009 10:49:30 +0900 |
parents | ec6c897448ca |
children | bb17841b32ec |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/SchedTaskList.cc Mon Dec 14 20:25:03 2009 +0900 +++ b/TaskManager/kernel/schedule/SchedTaskList.cc Tue Dec 15 10:49:30 2009 +0900 @@ -18,18 +18,13 @@ * SPE で生成されている場合、DMA の必要は無い * 0: メインメモリ, 1: SPE */ -SchedTaskList* -createSchedTaskList(memaddr next_list, Scheduler* scheduler, int renew_flag) -{ - SchedTaskList* sched = new SchedTaskList(next_list, scheduler); - return sched; -} SchedTaskList::SchedTaskList(memaddr addr, Scheduler *sched) { params_addr = addr; list = NULL; scheduler = sched; + cur_index = 0; } @@ -44,37 +39,16 @@ sizeof(TaskList), DMA_READ_TASKLIST); } -SchedTaskBase* -SchedTaskList::next(Scheduler *scheduler, SchedTaskBase *p) +void +SchedTaskList::exec() {} + +void +SchedTaskList::write() { - SchedTaskBase *nextSched; - __debug("[SchedTaskList:%s]\n", __FUNCTION__); scheduler->dma_wait(DMA_READ_TASKLIST); - if (list->length < 1) { - nextSched = new SchedNop2Ready(scheduler); - } else { -#ifdef SIMPLE_TASK - SimpleTaskPtr nextTask = &list->tasks[0]; -#else - TaskPtr nextTask = &list->tasks[0]; -#endif - nextSched = createSchedTask(scheduler, nextTask); - ((SchedTask*)nextSched)->init(list, nextTask, 1, scheduler); -#ifdef SIMPLE_TASK - if (nextTask->command==TaskArray1) { - // compatibility - return new SchedTaskArray(scheduler, nextSched); - } - if (nextTask->command==TaskArray) { - // Start Task Array - return (SchedTaskBase*)(new SchedTaskArrayLoad(scheduler, nextSched)); - } -#endif - } - - return nextSched; } + /* end */