Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/schedule/SchedTaskBase.h @ 776:922c0133c61c draft
heap corruption in TaskArray1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 05 Mar 2010 10:12:49 +0900 |
parents | 97adb3fe85c6 |
children | 1db779ac0268 |
rev | line source |
---|---|
42 | 1 #ifndef INCLUDED_SCHED_TASK_BASE |
2 #define INCLUDED_SCHED_TASK_BASE | |
3 | |
301
7f991471d43f
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
109
diff
changeset
|
4 #include "base.h" |
7f991471d43f
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
109
diff
changeset
|
5 #include "Scheduler.h" |
42 | 6 |
7 class Scheduler; | |
8 | |
9 class SchedTaskBase { | |
10 public: | |
11 /* constructor */ | |
776
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
12 // void *called ; // for debug |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
13 SchedTaskBase() { |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
14 // called = __builtin_return_address(1); |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
15 } |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
16 virtual ~SchedTaskBase() {} |
42 | 17 |
109 | 18 BASE_NEW_DELETE(SchedTaskBase); |
19 | |
42 | 20 // noaction in default |
776
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
21 virtual void load() {} |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
22 virtual void read() {} |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
23 virtual void exec() {} |
922c0133c61c
heap corruption in TaskArray1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
713
diff
changeset
|
24 virtual void write() {} |
42 | 25 |
26 /* functions */ | |
403
e2f29e912d0b
clean up and add more info on task_list
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
27 virtual SchedTaskBase* next(Scheduler *, SchedTaskBase*) {return 0;} |
708 | 28 |
29 /* variables */ | |
30 | |
31 // Task を実行するスケジューラ自身 | |
32 Scheduler *scheduler; | |
33 | |
34 SimpleTaskPtr task; | |
35 | |
36 // 現在スケジューラが実行している TaskList と、このタスクに対応する Task | |
37 TaskListPtr list; | |
38 // Task の、Tasklist での位置。(task = &list[cur_index-1]) | |
39 int cur_index; | |
40 | |
41 | |
42 | 42 }; |
43 | |
44 #endif |