Mercurial > hg > Members > kono > Cerium
diff TaskManager/kernel/schedule/SchedTask.cc @ 945:a9c7784e5dae
sort example fix ( simple task accepts one param and more compatible with old task)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 01 Aug 2010 19:29:27 +0900 |
parents | 0c11c2fd7e63 |
children | 33630c6ff445 |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/SchedTask.cc Sat Jul 31 21:40:30 2010 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Sun Aug 01 19:29:27 2010 +0900 @@ -34,14 +34,10 @@ } -/** - * dma_store の wait を行う - */ SchedTask::~SchedTask() { } - void SchedTask::init(TaskListPtr _list, TaskPtr _task, int index, Scheduler* sc) { @@ -164,16 +160,17 @@ scheduler->free_(p); } +/** + * SimpleTask has one parameter , one input, one output + */ -void* SchedTask::get_input(void *buff, int index) { - scheduler->printf("Cannot use inData in SimpleTask use TaskArray\n"); - return NULL; } -memaddr SchedTask::get_inputAddr(int index) { return 0; } -int SchedTask::get_inputSize(int index) {return 0; } -void* SchedTask::get_output(void *buff, int index) {return 0; } -memaddr SchedTask::get_outputAddr(int index) { return 0; } -int SchedTask::get_outputSize(int index) { return 0; } -memaddr SchedTask::get_param(int index) { return 0; } +void* SchedTask::get_input(void *buff, int index) { return readbuf; } +memaddr SchedTask::get_inputAddr(int index) { return task->rbuf; } +int SchedTask::get_inputSize(int index) {return task->r_size; } +void* SchedTask::get_output(void *buff, int index) {return writebuf; } +memaddr SchedTask::get_outputAddr(int index) { return task->wbuf; } +int SchedTask::get_outputSize(int index) { return task->w_size; } +memaddr SchedTask::get_param(int index) { return task->param; } void*