42
|
1 #include <stdio.h>
|
|
2 #include "SchedNop2Ready.h"
|
109
|
3 #include "SchedTaskList.h"
|
42
|
4 #include "SchedMail.h"
|
|
5 #include "error.h"
|
|
6
|
109
|
7 SchedNop2Ready::SchedNop2Ready(Scheduler *cn)
|
42
|
8 {
|
109
|
9 scheduler = cn;
|
42
|
10 }
|
|
11
|
|
12 void
|
|
13 SchedNop2Ready::exec(void)
|
|
14 {
|
|
15 __debug("[SchedNop2Ready:%s]\n", __FUNCTION__);
|
|
16
|
109
|
17 //scheduler->mail_write(MY_SPE_STATUS_READY);
|
42
|
18 }
|
|
19
|
|
20 SchedTaskBase*
|
|
21 SchedNop2Ready::next(Scheduler *m, SchedTaskBase *p)
|
|
22 {
|
184
|
23 SchedTaskBase *nextSched;
|
|
24
|
42
|
25 __debug("[SchedNop2Ready:%s]\n", __FUNCTION__);
|
|
26
|
|
27 delete p;
|
|
28
|
187
|
29 nextSched = scheduler->get_nextRenewTaskList();
|
184
|
30
|
|
31 // RenewTask ¤¬¤¢¤ë
|
|
32 if (nextSched) {
|
|
33 return nextSched;
|
109
|
34 } else {
|
|
35 scheduler->mail_write(MY_SPE_STATUS_READY);
|
|
36 return new SchedMail(scheduler);
|
|
37 }
|
42
|
38 }
|