42
|
1 #include "SchedMail.h"
|
|
2 #include "SchedTaskList.h"
|
|
3 #include "SchedExit.h"
|
|
4 #include "error.h"
|
|
5
|
109
|
6 SchedMail::SchedMail(Scheduler *sched)
|
42
|
7 {
|
109
|
8 scheduler = sched;
|
42
|
9 }
|
|
10
|
|
11 SchedTaskBase*
|
|
12 SchedMail::next(Scheduler *m, SchedTaskBase *p)
|
|
13 {
|
|
14 delete p;
|
233
|
15
|
|
16 params_addr = scheduler->mail_read();
|
42
|
17
|
|
18 __debug("[SchedMail:%s]\n", __FUNCTION__);
|
|
19 // if 文なくすには・・・関数ポインタ?
|
|
20 if ((int)params_addr == MY_SPE_COMMAND_EXIT) {
|
|
21 return new SchedExit();
|
|
22 } else {
|
109
|
23 return new SchedTaskList(params_addr, m);
|
42
|
24 }
|
|
25 }
|