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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_SCHED_TASK_BASE
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_SCHED_TASK_BASE
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
6
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
7 class Scheduler;
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
8
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
9 class SchedTaskBase {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
10 public:
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
17
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 42
diff changeset
18 BASE_NEW_DELETE(SchedTaskBase);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 42
diff changeset
19
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
25
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
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
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
28
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
29 /* variables */
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
30
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
31 // Task を実行するスケジューラ自身
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
32 Scheduler *scheduler;
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
33
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
34 SimpleTaskPtr task;
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
35
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
36 // 現在スケジューラが実行している TaskList と、このタスクに対応する Task
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
37 TaskListPtr list;
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
38 // Task の、Tasklist での位置。(task = &list[cur_index-1])
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
39 int cur_index;
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
40
d41c62201b1e cleean up SchedTasks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 403
diff changeset
41
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
42 };
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
43
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
44 #endif