diff include/TaskManager/SchedTask.h @ 302:b0d37afab06a

working on macosx
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 08 Jun 2009 18:07:26 +0900
parents bcb81858aa62
children f8184487cf2c
line wrap: on
line diff
--- a/include/TaskManager/SchedTask.h	Sun Jun 07 19:45:41 2009 +0900
+++ b/include/TaskManager/SchedTask.h	Mon Jun 08 18:07:26 2009 +0900
@@ -1,53 +1,54 @@
 #ifndef INCLUDED_SCHED_TASK
 #define INCLUDED_SCHED_TASK
 
-#include "base.h"
-#include "Scheduler.h"
-#include "SchedTaskBase.h"
-#include "ListData.h"
-#include "TaskGroup.h"
+#include "SchedTaskImpl.h"
+
+class SchedTask : public SchedTaskImpl {
+public:
 
-class SchedTask : public SchedTaskBase {
-public:
+    /* variables */
+
+    virtual ~SchedTask() {
+    }
+
     /* constructor */
-    SchedTask(void);
-    ~SchedTask(void);
 
     BASE_NEW_DELETE(SchedTask);
 
-    /* variables */
-    SchedTaskImpl* schedTaskImpl;
     // ここをユーザが継承して
     // それぞれのタスクに対応した処理を記述する
-    virtual int run(void* r, void *w) { return 0; }
+    virtual int run(void* r, void *w)  { return 0;}
 
     //---  User API ---
-    int get_cpuid() {schedTaskImpl->get_cpuid();}
+
+    int get_cpuid() {return SchedTaskImpl::get_cpuid();}
 
-    void* get_input(void *buff, int index);
-    void* get_output(void *buff, int index);
-    uint32 get_inputAddr(int index);
-    uint32 get_outputAddr(int index);
-    int get_inputSize(int index);
-    int get_outputSize(int index);
-    int get_param(int index);
+    void* get_input(void *buff, int index) {return SchedTaskImpl::get_input(buff,index);}
+    void* get_output(void *buff, int index) {return SchedTaskImpl::get_output(buff,index);}
+    uint32 get_inputAddr(int index) {return SchedTaskImpl::get_inputAddr(index);}
+    uint32 get_outputAddr(int index) {return SchedTaskImpl::get_outputAddr(index);}
+    int get_inputSize(int index) {return SchedTaskImpl::get_inputSize(index);}
+    int get_outputSize(int index) {return SchedTaskImpl::get_outputSize(index);}
+    int get_param(int index) {return SchedTaskImpl::get_param(index);}
 
-    TaskPtr create_task(int cmd);
-    void wait_task(TaskPtr waitTask);
+    TaskPtr create_task(int cmd) {return SchedTaskImpl::create_task(cmd);}
+    void wait_task(TaskPtr waitTask) {SchedTaskImpl::wait_task(waitTask);}
 
-    void* global_alloc(int id, int size);
-    void* global_get(int id);
-    void global_free(int id);
+    void* global_alloc(int id, int size) {return SchedTaskImpl::global_alloc(id,size);}
+    void* global_get(int id) {return SchedTaskImpl::global_get(id);}
+    void global_free(int id) {SchedTaskImpl::global_free(id);}
 
-    void mainMem_alloc(int id, int size);
-    void mainMem_wait(void);
-    void* mainMem_get(int id);
+    void mainMem_alloc(int id, int size) {SchedTaskImpl::mainMem_alloc(id,size);}
+    void mainMem_wait() { SchedTaskImpl::mainMem_wait();}
+    void* mainMem_get(int id) {return SchedTaskImpl::mainMem_get(id);}
 
-    void *allocate(int size);
+    void *allocate(int size) {return SchedTaskImpl::allocate(size);}
 
-    void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask);
-    void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask);
-    void dma_wait(uint32 mask);
-#endif
+    void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {SchedTaskImpl::dma_load(buf,addr,size,mask);}
+    void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {SchedTaskImpl::dma_load(buf,addr,size,mask);}
+    void dma_wait(uint32 mask) {SchedTaskImpl::dma_wait(mask);}
+};
 
 extern SchedTask* createSchedTask(TaskPtr);
+
+#endif