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
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_FIFO_TASK_MANAGER_IMPL
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_FIFO_TASK_MANAGER_IMPL
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
3
307
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
4 #include "TaskManagerImpl.h"
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
5 #include "MainScheduler.h"
373
eab18aa0c7f6 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 366
diff changeset
6 #include "Scheduler.h"
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
7
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
8 class FifoTaskManagerImpl : public TaskManagerImpl {
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
9 public:
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
10 /* constructor */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
11 FifoTaskManagerImpl(int num = 1) : TaskManagerImpl(num) {}
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
12 ~FifoTaskManagerImpl(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
13
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
14 /* variables */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
17
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
18 MailManager *mailManager;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
19 MainScheduler *scheduler;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
20
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
21 /* functions */
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
22 // call by system
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
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
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
25 void run(void);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
26 void mail_check(MailQueuePtr mail_list);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
27 TaskListPtr get_runTaskList(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
28 MailQueuePtr schedule(TaskListPtr);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
29
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
30 // call by user
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
31 int add_data(ListDataPtr, uint32, int);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
32 void* allocate(int size);
373
eab18aa0c7f6 MemList not working
kazz@kazzone.cr.ie.u-ryukyu.ac.jp
parents: 366
diff changeset
33 Scheduler* get_scheduler();
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
34 };
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
35
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
36 #ifndef Cerium_malloc
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
37 #define Cerium_malloc(dest, align, size) \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
38 *dest = malloc(size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
39 #endif /* Cerium_malloc */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
40
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 58
diff changeset
41 #endif /* INCLUDED_FIFO_TASK_MANAGER_IMPL */