Mercurial > hg > Members > kono > Cerium
diff TaskManager/kernel/sys_task/TaskArray.cc @ 685:b386522827ae
Bulk task on going.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Dec 2009 00:32:34 +0900 |
parents | 458a1ad91427 |
children | 257ad1a518e3 |
line wrap: on
line diff
--- a/TaskManager/kernel/sys_task/TaskArray.cc Sun Dec 06 23:03:28 2009 +0900 +++ b/TaskManager/kernel/sys_task/TaskArray.cc Mon Dec 07 00:32:34 2009 +0900 @@ -6,20 +6,13 @@ 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 + +#ifdef TEST_TASK_ARRAY Task *task = (Task *)rbuf; Task *last = (Task*)(((char*)rbuf)+ s->read_size()); @@ -27,9 +20,15 @@ while( task < last) { s->printf(" task = %lx\n" ,(long) task); task->print(); - task = next(task); + task = task->next(); } +#else + + Task *task = (Task *)rbuf; + SchedTaskArray *nextSched = createSchedTaskArray(s->get_scheduler(), task); + s->get_scheduler()->run(nextSched); + #endif - +#endif return 0; }