view include/TaskManager/Scheduler.h @ 80:1c648675c2bd

*** empty log message ***
author gongo
date Wed, 20 Feb 2008 10:56:37 +0900
parents 178459e03f5c
children 028ffc9c0375
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] __attribute__((aligned(16)));
    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