diff TaskManager/Cell/CellTaskManagerImpl.h @ 366:09f33c51a204

rename include/TaskManager/* and add memory
author aaa
date Mon, 27 Jul 2009 15:51:18 +0900
parents include/TaskManager/CellTaskManagerImpl.h@7075842aa155
children b4b8345b5366
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Cell/CellTaskManagerImpl.h	Mon Jul 27 15:51:18 2009 +0900
@@ -0,0 +1,45 @@
+#ifndef INCLUDED_CELL_TASK_MANAGER_IMPL
+#define INCLUDED_CELL_TASK_MANAGER_IMPL
+
+#include "TaskManagerImpl.h"
+#include "FifoTaskManagerImpl.h"
+#include "SpeThreads.h"
+
+class CellTaskManagerImpl : public TaskManagerImpl {
+public:
+    /* constructor */
+    CellTaskManagerImpl(int num = 1) : TaskManagerImpl(num) {}
+    ~CellTaskManagerImpl(void);
+
+    /* variables */
+    TaskListPtr *speTaskList;
+    TaskListPtr *speTaskList_bg;
+
+    SpeThreads *speThreads;
+    int *flag_sendTaskList;
+    FifoTaskManagerImpl *ppeManager;
+
+    /* functions */
+    // system
+    void init(void);
+    void run(void);
+    TaskListPtr mail_check(MailQueuePtr mail_list);
+    void set_runTaskList(void);
+    void append_activeTask(HTaskPtr);
+
+    // user
+    int add_data(ListDataPtr, uint32, int);
+    void* allocate(int size);
+
+private:
+    void send_taskList(int id);
+};
+
+#ifdef Cerium_malloc
+#undef Cerium_malloc
+#endif
+
+#define Cerium_malloc(dest, align, size) \
+    posix_memalign((void**)(dest), (align), (size))
+
+#endif