3
|
1 #ifndef INCLUDED_FIFO_TASK_MANAGER_IMPL
|
|
2 #define INCLUDED_FIFO_TASK_MANAGER_IMPL
|
|
3
|
|
4 #ifndef INCLUDED_TASK_MANAGER_IMPL
|
|
5 # include "TaskManagerImpl.h"
|
|
6 #endif
|
|
7
|
109
|
8 #ifndef INCLUDED_MAIN_SCHEDULER
|
|
9 # include "MainScheduler.h"
|
|
10 #endif
|
|
11
|
3
|
12 class FifoTaskManagerImpl : public TaskManagerImpl {
|
|
13 public:
|
109
|
14 /* constructor */
|
|
15 FifoTaskManagerImpl(int num = 1) : TaskManagerImpl(num) {}
|
|
16 ~FifoTaskManagerImpl(void);
|
|
17
|
|
18 /* variables */
|
|
19 int machineNum;
|
|
20 TaskListPtr mainTaskList;
|
|
21
|
|
22 MailManager *mailManager;
|
|
23 MainScheduler *scheduler;
|
|
24
|
3
|
25 /* functions */
|
109
|
26 // call by system
|
3
|
27 void init(void);
|
109
|
28 void init(MainScheduler*, BufferManager*);
|
3
|
29 void run(void);
|
109
|
30 void mail_check(MailQueuePtr mail_list);
|
|
31 void mail_check(MailQueuePtr mail_list, TaskQueuePtr *waitQueue);
|
|
32 TaskListPtr get_runTaskList(void);
|
|
33 MailQueuePtr schedule(TaskListPtr);
|
|
34
|
|
35 // call by user
|
|
36 int add_data(ListDataPtr, uint32, int);
|
|
37 void* allocate(int size);
|
3
|
38 };
|
|
39
|
109
|
40 #ifndef Cerium_malloc
|
|
41 #define Cerium_malloc(dest, align, size) \
|
|
42 *dest = malloc(size);
|
|
43 #endif /* Cerium_malloc */
|
|
44
|
|
45 #endif /* INCLUDED_FIFO_TASK_MANAGER_IMPL */
|