Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/ppe/TaskManagerImpl.h @ 475:e083c4ff91c1
BufferManager removed.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 04 Oct 2009 11:29:50 +0900 |
parents | eab18aa0c7f6 |
children | 5bda98b0b56d |
rev | line source |
---|---|
3 | 1 #ifndef INCLUDED_TASK_MANAGER_IMPL |
2 #define INCLUDED_TASK_MANAGER_IMPL | |
3 | |
307 | 4 #include "MailManager.h" |
5 #include "ListData.h" | |
373 | 6 #include "Scheduler.h" |
475
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
7 #include "TaskListInfo.h" |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
8 #include "TaskQueueInfo.h" |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
9 #include "HTaskInfo.h" |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
10 |
54 | 11 |
3 | 12 class TaskManagerImpl { |
13 public: | |
14 /* constructor */ | |
15 TaskManagerImpl(int num = 1); | |
109 | 16 virtual ~TaskManagerImpl(void) {} |
3 | 17 |
18 /* variables */ | |
19 int machineNum; | |
109 | 20 TaskQueuePtr activeTaskQueue; |
21 TaskQueuePtr waitTaskQueue; | |
475
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
22 |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
23 /* variables */ |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
24 TaskListInfo *taskListImpl; |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
25 TaskQueueInfo *taskQueueImpl; |
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
26 HTaskInfo *htaskImpl; |
3 | 27 |
28 /* functions */ | |
109 | 29 // system |
30 virtual void init(void) = 0; | |
31 virtual void run(void) = 0; | |
32 virtual void append_activeTask(HTaskPtr); | |
33 virtual void append_waitTask(HTaskPtr); | |
34 | |
35 void check_task_finish(HTaskPtr task); | |
36 void notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list); | |
37 TaskQueuePtr remove_taskQueue(TaskQueuePtr list, TaskQueuePtr task); | |
38 TaskQueuePtr remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task); | |
39 void remove_taskQueue_all(TaskQueuePtr list); | |
40 void wakeup_waitTask(void); | |
41 | |
42 void systask_init(void); | |
43 | |
44 // user | |
45 HTaskPtr create_task(int cmd); | |
3 | 46 void set_task_depend(HTaskPtr master, HTaskPtr slave); |
109 | 47 void spawn_task(HTaskPtr); |
65 | 48 void set_task_cpu(HTaskPtr, CPU_TYPE); |
109 | 49 virtual void* allocate(int size) = 0; |
373 | 50 virtual Scheduler* get_scheduler() = 0; |
3 | 51 }; |
52 #endif |