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);
|
88
|
24 //HTaskPtr create_task(int cmd, int siz, DmaBuffer *in_addr,
|
|
25 //DmaBuffer *out_addr, void (*func)(void));
|
|
26 HTaskPtr create_task(int cmd, int siz, unsigned int in_addr,
|
|
27 unsigned int out_addr, void (*func)(void));
|
63
|
28 //void set_task_depend(HTaskPtr master, HTaskPtr slave);
|
|
29 //void spawn_task(HTaskPtr);
|
3
|
30 void run(void);
|
|
31
|
14
|
32 void set_init_task(const char *sym);
|
|
33
|
|
34 void set_symbol(const char *sym, void *addr);
|
|
35 int open(const char *sym);
|
|
36 static void* get_address(int fd);
|
54
|
37
|
|
38 DmaBuffer* allocate(int size);
|
14
|
39
|
3
|
40 private:
|
|
41 int machineNum;
|
|
42 };
|
|
43
|
|
44 #endif
|