Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Fifo/FifoTaskManagerImpl.h @ 498:cb5ecfc5aaa3
double linked HTaskInfo/HTask
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 11:46:41 +0900 |
parents | 9745d08e2f25 |
children | 1d4a8a86f26b |
rev | line source |
---|---|
3 | 1 #ifndef INCLUDED_FIFO_TASK_MANAGER_IMPL |
2 #define INCLUDED_FIFO_TASK_MANAGER_IMPL | |
3 | |
307 | 4 #include "TaskManagerImpl.h" |
5 #include "MainScheduler.h" | |
373 | 6 #include "Scheduler.h" |
109 | 7 |
3 | 8 class FifoTaskManagerImpl : public TaskManagerImpl { |
9 public: | |
109 | 10 /* constructor */ |
11 FifoTaskManagerImpl(int num = 1) : TaskManagerImpl(num) {} | |
12 ~FifoTaskManagerImpl(void); | |
13 | |
14 /* variables */ | |
15 int machineNum; | |
479
5bda98b0b56d
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
16 TaskListPtr mainTaskList; // activeTask であるべきなんじゃないの? |
109 | 17 |
18 MailManager *mailManager; | |
19 MainScheduler *scheduler; | |
20 | |
3 | 21 /* functions */ |
109 | 22 // call by system |
3 | 23 void init(void); |
475
e083c4ff91c1
BufferManager removed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
373
diff
changeset
|
24 void init(MainScheduler*, TaskManagerImpl*); |
3 | 25 void run(void); |
109 | 26 void mail_check(MailQueuePtr mail_list); |
498
cb5ecfc5aaa3
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
485
diff
changeset
|
27 void mail_check(MailQueuePtr mail_list, HTaskInfo *waitQueue); |
109 | 28 TaskListPtr get_runTaskList(void); |
29 MailQueuePtr schedule(TaskListPtr); | |
30 | |
31 // call by user | |
32 int add_data(ListDataPtr, uint32, int); | |
33 void* allocate(int size); | |
373 | 34 Scheduler* get_scheduler(); |
3 | 35 }; |
36 | |
109 | 37 #ifndef Cerium_malloc |
38 #define Cerium_malloc(dest, align, size) \ | |
39 *dest = malloc(size); | |
40 #endif /* Cerium_malloc */ | |
41 | |
42 #endif /* INCLUDED_FIFO_TASK_MANAGER_IMPL */ |