3
|
1 #ifndef INCLUDED_TASK_MANAGER
|
|
2 #define INCLUDED_TASK_MANAGER
|
|
3
|
|
4 #ifndef INCLUDED_TASK_MANAGER_IMPL
|
|
5 # include "TaskManagerImpl.h"
|
|
6 #endif
|
|
7
|
14
|
8 #ifndef INCLUDED_SYMTABLE
|
|
9 # include "SymTable.h"
|
|
10 #endif
|
|
11
|
3
|
12 class TaskManager {
|
|
13 public:
|
|
14 /* constructor */
|
|
15 TaskManager(int num = 1); // The number of threads
|
|
16
|
|
17 /* variables */
|
|
18 TaskManagerImpl *m_impl;
|
14
|
19 static SymTable *symtb;
|
3
|
20
|
|
21 /* functions */
|
|
22 void init(void);
|
20
|
23 void finish(void);
|
54
|
24 HTaskPtr create_task(int cmd, int siz, DmaBuffer *in_addr,
|
|
25 DmaBuffer *out_addr, void (*func)(void));
|
63
|
26 //void set_task_depend(HTaskPtr master, HTaskPtr slave);
|
|
27 //void spawn_task(HTaskPtr);
|
3
|
28 void run(void);
|
|
29
|
14
|
30 void set_init_task(const char *sym);
|
|
31
|
|
32 void set_symbol(const char *sym, void *addr);
|
|
33 int open(const char *sym);
|
|
34 static void* get_address(int fd);
|
54
|
35
|
|
36 DmaBuffer* allocate(int size);
|
14
|
37
|
3
|
38 private:
|
|
39 int machineNum;
|
|
40 };
|
|
41
|
|
42 #endif
|