view include/TaskManager/Scheduler.h @ 68:35a6cf176c38

*** empty log message ***
author chiaki
date Sun, 17 Feb 2008 21:45:07 +0900
parents 7927e00fb8e2
children 178459e03f5c
line wrap: on
line source

#ifndef INCLUDED_SCHEDULER
#define INCLUDED_SCHEDULER

#ifndef INCLUDED_TASK
#  include "task.h"
#endif

#ifndef INCLUDED_DMA_MANAGER
#  include "DmaManager.h"
#endif

#ifndef INCLUDED_SCHED_TASK_BASE
#  include "SchedTaskBase.h"
#endif

class SchedTaskBase;

class Scheduler {
public:
    virtual ~Scheduler(void) {}

    /* variables */
    TaskListPtr listBuf[2];
    void *readBuf[2];
    void *writeBuf[2];
    int listBufFlg;
    int readBufFlg;
    int writeBufFlg;

    DmaManager* connector;
    
    SchedTaskBase* task1;
    SchedTaskBase* task2;
    SchedTaskBase* task3;

    /* functions */
    void init(void);
    void run(void);
    virtual void init_impl(void) = 0;
    void finish(void);

    TaskListPtr get_curListBuf(void);
    void* get_curReadBuf(void);
    void* get_curWriteBuf(void);
};

#endif