Mercurial > hg > Game > Cerium
view TaskManager/kernel/sys_task/TaskArray.cc @ 689:ecf63089f5bb draft
Task Array generation worked.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Dec 2009 23:03:28 +0900 |
parents | 77c89477daa8 |
children | 107e6e77f482 |
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()); s->printf("last = %lx\n" ,(long) last); while( task < last) { s->printf(" task = %lx\n" ,(long) task); task->print(); task = next(task); } #endif return 0; }