view include/TaskManager/CellTaskManagerImpl.h @ 350:628cb162be88 draft

add tasts.xml renderer.xml
author admin@mcbk.cr.ie.u-ryukyu.ac.jp
date Fri, 10 Jul 2009 16:41:20 +0900
parents 3fc86ddf5d1c
children
line wrap: on
line source

#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