annotate TaskManager/kernel/ppe/TaskManagerImpl.h @ 634:62e570ac5db2 draft

SimpleTask start
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 18 Nov 2009 17:29:14 +0900
parents 278db3ca751d
children aba1600e8f83
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_TASK_MANAGER_IMPL
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_TASK_MANAGER_IMPL
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
3
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
4 #include "MailManager.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
5 #include "ListData.h"
475
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
6 #include "TaskListInfo.h"
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
7 #include "TaskQueueInfo.h"
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
8 #include "HTaskInfo.h"
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 567
diff changeset
9 class Scheduler;
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 567
diff changeset
10 class MemList;
475
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
11
54
90523ccc4dff *** empty log message ***
gongo
parents: 50
diff changeset
12
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
13 class TaskManagerImpl {
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
14 public:
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
15
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
16 /* variables */
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
17 int machineNum;
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 496
diff changeset
18 HTaskInfo *activeTaskQueue;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 496
diff changeset
19 HTaskInfo *waitTaskQueue;
475
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
20
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
21 TaskListInfo *taskListImpl;
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
22 TaskQueueInfo *taskQueueImpl;
4e0308d2ba73 BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 373
diff changeset
23 HTaskInfo *htaskImpl;
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 567
diff changeset
24
546
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
25 SchedTask *schedTaskManager;
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
26
480
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
27 /* constructor */
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
28 TaskManagerImpl(int num = 1) ;
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
29
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
30 virtual ~TaskManagerImpl() { }
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
31
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
32 /* functions */
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
33 // system
480
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
34 virtual void init() = 0;
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
35 virtual void run() = 0;
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 496
diff changeset
36 virtual void append_activeTask(HTaskPtr);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 496
diff changeset
37 virtual void append_waitTask(HTaskPtr);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
38
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
39 void check_task_finish(HTaskPtr task);
480
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
40 void wakeup_waitTask();
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
41
480
75e4afa40da2 TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 479
diff changeset
42 void systask_init();
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
43
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
44 // user
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
45 HTaskPtr create_task(int cmd);
634
62e570ac5db2 SimpleTask start
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
46 HTaskPtr create_task(int cmd, void *rbuf, long r_size, void *rbuf, long w_size);
567
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
47 void set_task_depend(HTaskPtr master, HTaskPtr slave);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 547
diff changeset
48 void spawn_task(HTaskPtr);
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
49 void set_task_cpu(HTaskPtr, CPU_TYPE);
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 567
diff changeset
50
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
51 virtual void* allocate(int size) = 0;
538
5641d121818e code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 498
diff changeset
52 virtual void* allocate(int size,int align) = 0;
373
205e4a4af635 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 366
diff changeset
53 virtual Scheduler* get_scheduler() = 0;
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
54 };
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 567
diff changeset
55
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
56 #endif