Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Cell/spe/TaskArray.cc @ 713:f725c6455d19
remove SIMPLE_TASK conditional
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 16 Dec 2009 15:27:46 +0900 |
parents | 9a6cb2439593 |
children |
comparison
equal
deleted
inserted
replaced
712:4661eaa48b77 | 713:f725c6455d19 |
---|---|
4 #include "Task.h" | 4 #include "Task.h" |
5 | 5 |
6 | 6 |
7 SchedDefineTask(TaskArray); | 7 SchedDefineTask(TaskArray); |
8 | 8 |
9 #ifdef SIMPLE_TASK | |
10 static Task * | 9 static Task * |
11 next(Task *t) | 10 next(Task *t) |
12 { | 11 { |
13 char *p = (char*)t; | 12 char *p = (char*)t; |
14 p += t->size(); | 13 p += t->size(); |
15 return (Task*)p; | 14 return (Task*)p; |
16 } | 15 } |
17 #endif | |
18 | 16 |
19 static int | 17 static int |
20 run(SchedTask *s,void *rbuf, void *wbuf) | 18 run(SchedTask *s,void *rbuf, void *wbuf) |
21 { | 19 { |
22 #ifdef SIMPLE_TASK | |
23 Task *task = (Task *)rbuf; | 20 Task *task = (Task *)rbuf; |
24 Task *last = ((char*)rbuf)+ s->read_size(); | 21 Task *last = ((char*)rbuf)+ s->read_size(); |
25 | 22 |
26 while( task < last) { | 23 while( task < last) { |
27 task->print(s); | 24 task->print(s); |
28 task = next(task); | 25 task = next(task); |
29 } | 26 } |
30 #endif | |
31 | 27 |
32 return 0; | 28 return 0; |
33 } | 29 } |