Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/spe/SpeTaskList.cc @ 10:7aa4c006e4be
*** empty log message ***
author | gongo |
---|---|
date | Wed, 06 Feb 2008 18:31:30 +0900 |
parents | 2356238ebea7 |
children | 6a77b5e755ab |
line wrap: on
line source
#include <stdio.h> #include "SpeTaskList.h" #include "SpeTask.h" #include "SpeNop2Ready.h" #include "DmaManager.h" #include "error.h" SpeTaskList::SpeTaskList(unsigned int addr, TaskListPtr listbuf, DmaManager* c) { params_addr = addr; list = listbuf; connector = c; } void SpeTaskList::read(void) { __debug("SpeTaskList::read()"); connector->dma_load(list, params_addr, sizeof(TaskList), DMA_READ); connector->dma_wait(DMA_READ); } void SpeTaskList::exec(void) { __debug("SpeTaskList::exec()"); } #ifdef DEBUG void SpeTaskList::write(void) { printf("SpeTaskList::exec()\n"); } #endif SpeTaskBase* SpeTaskList::next(SpeManager *m, SpeTaskBase *p) { __debug("SpeTaskList::next()"); delete p; if (list->length < 1) { return new SpeNop2Ready(connector); } else { // 本当は、ここで task->command に対応する、 // SpeTask を継承する class を作ればいい。。。はず return new SpeTask(list, &list->tasks[--list->length], m->get_curReadBuf(), m->get_curWriteBuf(), connector); } }