view include/TaskManager/TaskManager.h @ 70:178459e03f5c

*** empty log message ***
author gongo
date Mon, 18 Feb 2008 01:13:00 +0900
parents 54355e641172
children 83b57e03d3ef
line wrap: on
line source

#ifndef INCLUDED_TASK_MANAGER
#define INCLUDED_TASK_MANAGER

#ifndef INCLUDED_TASK_MANAGER_IMPL
#  include "TaskManagerImpl.h"
#endif

#ifndef INCLUDED_SYMTABLE
#  include "SymTable.h"
#endif

class TaskManager {
public:
    /* constructor */
    TaskManager(int num = 1); // The number of threads

    /* variables */
    TaskManagerImpl *m_impl;
    static SymTable *symtb;

    /* functions */
    void init(void);
    void finish(void);
    HTaskPtr create_task(int cmd, int siz, DmaBuffer *in_addr,
			 DmaBuffer *out_addr, void (*func)(void));
    //void set_task_depend(HTaskPtr master, HTaskPtr slave);
    //void spawn_task(HTaskPtr);
    void run(void);

    void set_init_task(const char *sym);

    void set_symbol(const char *sym, void *addr);
    int open(const char *sym);
    static void* get_address(int fd);

    DmaBuffer* allocate(int size);
    
private:
    int machineNum;
};

#endif