58
|
1 #ifndef INCLUDED_CELL_TASK_MANAGER_IMPL
|
|
2 #define INCLUDED_CELL_TASK_MANAGER_IMPL
|
|
3
|
307
|
4 #include "TaskManagerImpl.h"
|
|
5 #include "FifoTaskManagerImpl.h"
|
|
6 #include "SpeThreads.h"
|
65
|
7
|
58
|
8 class CellTaskManagerImpl : public TaskManagerImpl {
|
|
9 public:
|
67
|
10 /* constructor */
|
109
|
11 CellTaskManagerImpl(int num = 1) : TaskManagerImpl(num) {}
|
|
12 ~CellTaskManagerImpl(void);
|
67
|
13
|
65
|
14 /* variables */
|
109
|
15 TaskListPtr *speTaskList;
|
|
16 TaskListPtr *speTaskList_bg;
|
|
17
|
65
|
18 SpeThreads *speThreads;
|
109
|
19 int *flag_sendTaskList;
|
|
20 FifoTaskManagerImpl *ppeManager;
|
65
|
21
|
58
|
22 /* functions */
|
109
|
23 // system
|
58
|
24 void init(void);
|
|
25 void run(void);
|
109
|
26 TaskListPtr mail_check(MailQueuePtr mail_list);
|
|
27 void set_runTaskList(void);
|
|
28 void append_activeTask(HTaskPtr);
|
|
29
|
|
30 // user
|
|
31 int add_data(ListDataPtr, uint32, int);
|
|
32 void* allocate(int size);
|
|
33
|
|
34 private:
|
|
35 void send_taskList(int id);
|
58
|
36 };
|
|
37
|
109
|
38 #ifdef Cerium_malloc
|
|
39 #undef Cerium_malloc
|
58
|
40 #endif
|
109
|
41
|
|
42 #define Cerium_malloc(dest, align, size) \
|
|
43 posix_memalign((void**)(dest), (align), (size))
|
|
44
|
|
45 #endif
|