Mercurial > hg > Game > Cerium
annotate TaskManager/Cell/spe/TaskArray.cc @ 2054:2e7a6f40672f draft
add param(4) in FileMapReduce.cc
author | masa |
---|---|
date | Fri, 29 Jan 2016 15:56:28 +0900 |
parents | 97adb3fe85c6 |
children |
rev | line source |
---|---|
688 | 1 #include "Finish.h" |
2 #include "SysFunc.h" | |
3 #include "Scheduler.h" | |
4 #include "Task.h" | |
5 | |
6 | |
7 SchedDefineTask(TaskArray); | |
8 | |
9 static Task * | |
10 next(Task *t) | |
11 { | |
12 char *p = (char*)t; | |
13 p += t->size(); | |
14 return (Task*)p; | |
15 } | |
16 | |
17 static int | |
18 run(SchedTask *s,void *rbuf, void *wbuf) | |
19 { | |
20 Task *task = (Task *)rbuf; | |
21 Task *last = ((char*)rbuf)+ s->read_size(); | |
22 | |
23 while( task < last) { | |
24 task->print(s); | |
25 task = next(task); | |
26 } | |
27 | |
28 return 0; | |
29 } |