annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_SCHED_TASK
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_SCHED_TASK
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
3
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
4 #include "SchedTaskImpl.h"
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
5
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
6 class SchedTask : public SchedTaskImpl {
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
7 public:
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
8
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
9 /* variables */
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
10
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
11 virtual ~SchedTask() {
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
12 }
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
13
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
14 /* constructor */
88
504899860e66 *** empty log message ***
gongo
parents: 82
diff changeset
15
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
16 BASE_NEW_DELETE(SchedTask);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
17
298
58fd16298954 from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 212
diff changeset
18 // ここをユーザが継承して
58fd16298954 from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 212
diff changeset
19 // それぞれのタスクに対応した処理を記述する
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
20 virtual int run(void* r, void *w) { return 0;}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
21
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
22 //--- User API ---
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
23
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
24 int get_cpuid() {return SchedTaskImpl::get_cpuid();}
194
gongo@localhost.localdomain
parents: 184
diff changeset
25
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
26 void* get_input(void *buff, int index) {return SchedTaskImpl::get_input(buff,index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
27 void* get_output(void *buff, int index) {return SchedTaskImpl::get_output(buff,index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
28 uint32 get_inputAddr(int index) {return SchedTaskImpl::get_inputAddr(index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
29 uint32 get_outputAddr(int index) {return SchedTaskImpl::get_outputAddr(index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
30 int get_inputSize(int index) {return SchedTaskImpl::get_inputSize(index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
31 int get_outputSize(int index) {return SchedTaskImpl::get_outputSize(index);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
32 int get_param(int index) {return SchedTaskImpl::get_param(index);}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
33
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
34 TaskPtr create_task(int cmd) {return SchedTaskImpl::create_task(cmd);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
35 void wait_task(TaskPtr waitTask) {SchedTaskImpl::wait_task(waitTask);}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
36
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
37 void* global_alloc(int id, int size) {return SchedTaskImpl::global_alloc(id,size);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
38 void* global_get(int id) {return SchedTaskImpl::global_get(id);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
39 void global_free(int id) {SchedTaskImpl::global_free(id);}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
40
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
41 void mainMem_alloc(int id, int size) {SchedTaskImpl::mainMem_alloc(id,size);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
42 void mainMem_wait() { SchedTaskImpl::mainMem_wait();}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
43 void* mainMem_get(int id) {return SchedTaskImpl::mainMem_get(id);}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
44
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
45 void *allocate(int size) {return SchedTaskImpl::allocate(size);}
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
46
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
47 void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {SchedTaskImpl::dma_load(buf,addr,size,mask);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
48 void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {SchedTaskImpl::dma_load(buf,addr,size,mask);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
49 void dma_wait(uint32 mask) {SchedTaskImpl::dma_wait(mask);}
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
50 };
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
51
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
52 extern SchedTask* createSchedTask(TaskPtr);
302
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
53
b0d37afab06a working on macosx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 301
diff changeset
54 #endif