682
|
1 #include "Finish.h"
|
|
2 #include "SysFunc.h"
|
|
3 #include "Scheduler.h"
|
|
4 #include "Task.h"
|
|
5
|
|
6
|
|
7 SchedDefineTask(TaskArray);
|
|
8
|
683
|
9 #ifdef SIMPLE_TASK
|
682
|
10 static Task *
|
|
11 next(Task *t)
|
|
12 {
|
|
13 char *p = (char*)t;
|
|
14 p += t->size();
|
|
15 return (Task*)p;
|
|
16 }
|
683
|
17 #endif
|
682
|
18
|
|
19 static int
|
|
20 run(SchedTask *s,void *rbuf, void *wbuf)
|
|
21 {
|
683
|
22 #ifdef SIMPLE_TASK
|
682
|
23 Task *task = (Task *)rbuf;
|
683
|
24 Task *last = (Task*)(((char*)rbuf)+ s->read_size());
|
682
|
25
|
|
26 while( task < last) {
|
683
|
27 task->print();
|
682
|
28 task = next(task);
|
|
29 }
|
683
|
30 #endif
|
682
|
31
|
|
32 return 0;
|
|
33 }
|