comparison TaskManager/Cell/spe/TaskArray.cc @ 683:9a6cb2439593

on going...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 06 Dec 2009 18:53:46 +0900
parents
children f725c6455d19
comparison
equal deleted inserted replaced
682:80b23718df18 683:9a6cb2439593
1 #include "Finish.h"
2 #include "SysFunc.h"
3 #include "Scheduler.h"
4 #include "Task.h"
5
6
7 SchedDefineTask(TaskArray);
8
9 #ifdef SIMPLE_TASK
10 static Task *
11 next(Task *t)
12 {
13 char *p = (char*)t;
14 p += t->size();
15 return (Task*)p;
16 }
17 #endif
18
19 static int
20 run(SchedTask *s,void *rbuf, void *wbuf)
21 {
22 #ifdef SIMPLE_TASK
23 Task *task = (Task *)rbuf;
24 Task *last = ((char*)rbuf)+ s->read_size();
25
26 while( task < last) {
27 task->print(s);
28 task = next(task);
29 }
30 #endif
31
32 return 0;
33 }