Mercurial > hg > Game > Cerium
view TaskManager/kernel/sys_task/TaskArray.cc @ 688:77c89477daa8 draft
on going...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Dec 2009 18:53:46 +0900 |
parents | 25afcd4ae380 |
children | ecf63089f5bb |
line wrap: on
line source
#include "Finish.h" #include "SysFunc.h" #include "Scheduler.h" #include "Task.h" SchedDefineTask(TaskArray); #ifdef SIMPLE_TASK static Task * next(Task *t) { char *p = (char*)t; p += t->size(); return (Task*)p; } #endif static int run(SchedTask *s,void *rbuf, void *wbuf) { #ifdef SIMPLE_TASK Task *task = (Task *)rbuf; Task *last = (Task*)(((char*)rbuf)+ s->read_size()); while( task < last) { task->print(); task = next(task); } #endif return 0; }