Mercurial > hg > Game > Cerium
view TaskManager/kernel/schedule/SchedTaskArrayLoad.cc @ 777:c38799cc3f60 draft
fix memory coruption on task self
send mail on write is a bad idea.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 05 Mar 2010 12:48:02 +0900 |
parents | 97adb3fe85c6 |
children | 54f0180cea0f |
line wrap: on
line source
#include "SchedTaskArrayLoad.h" #include "SchedTaskArray.h" #include "Task.h" SchedTaskArrayLoad::SchedTaskArrayLoad(Scheduler *s, SchedTaskBase *savedTask_) { scheduler = s; savedTask = savedTask_; task = savedTask->task; } SchedTaskArrayLoad::~SchedTaskArrayLoad() {} void SchedTaskArrayLoad::read() { // if (task->r_size == 0) return; cannot happen... // load Task Array Data readbuf = scheduler->allocate(task->r_size); scheduler->dma_load(readbuf, task->rbuf,task->r_size, DMA_READ); } void SchedTaskArrayLoad::exec() { // もっと、はやめに DMA_READ して、最初のcodeをloadするべきか? scheduler->dma_wait(DMA_READ); } // to empty the pipeline void SchedTaskArrayLoad::write() {} // to empty the pipeline SchedTaskBase* SchedTaskArrayLoad::next(Scheduler *scheduler, SchedTaskBase *p) { Task *nextTask = (Task *)readbuf; return new SchedTaskArray(scheduler, savedTask, nextTask, nextTask); } /* end */