Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Fifo/FifoTaskManagerImpl.h @ 479:5bda98b0b56d
Double Linked List base TaskQueue
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 05 Oct 2009 10:36:37 +0900 |
parents | e083c4ff91c1 |
children | 9745d08e2f25 |
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); |
27 TaskListPtr get_runTaskList(void); | |
28 MailQueuePtr schedule(TaskListPtr); | |
29 | |
30 // call by user | |
31 int add_data(ListDataPtr, uint32, int); | |
32 void* allocate(int size); | |
373 | 33 Scheduler* get_scheduler(); |
3 | 34 }; |
35 | |
109 | 36 #ifndef Cerium_malloc |
37 #define Cerium_malloc(dest, align, size) \ | |
38 *dest = malloc(size); | |
39 #endif /* Cerium_malloc */ | |
40 | |
41 #endif /* INCLUDED_FIFO_TASK_MANAGER_IMPL */ |