Mercurial > hg > Game > Cerium
view TaskManager/Cell/spe/TaskArray.cc @ 801:eb6add789a24 draft
global id
author | yutaka@localhost.localdomain |
---|---|
date | Wed, 19 May 2010 14:59:41 +0900 |
parents | 97adb3fe85c6 |
children |
line wrap: on
line source
#include "Finish.h" #include "SysFunc.h" #include "Scheduler.h" #include "Task.h" SchedDefineTask(TaskArray); static Task * next(Task *t) { char *p = (char*)t; p += t->size(); return (Task*)p; } static int run(SchedTask *s,void *rbuf, void *wbuf) { Task *task = (Task *)rbuf; Task *last = ((char*)rbuf)+ s->read_size(); while( task < last) { task->print(s); task = next(task); } return 0; }