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