annotate TaskManager/kernel/ppe/HTask.h @ 1089:c0dc96c6f209 draft

htask->init fix.
author tkaito
date Wed, 22 Dec 2010 04:21:11 +0900
parents 338523ff6986
children 3c2c445be6ba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_HTASK
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_HTASK
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
4 #include "base.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
5 #include "types.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
6 #include "Task.h"
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
7 #include "TaskQueue.h"
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
8 #include "QueueInfo.h"
787
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
9 #include <stdio.h>
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 class TaskManagerImpl;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 499
diff changeset
12 class SchedTask;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 499
diff changeset
13
547
e5431e658038 continue..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 546
diff changeset
14 typedef void (*PostFunction)(SchedTask *s, void *read, void *write);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
956
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
16 extern QueueInfo<TaskQueue>* taskQueuePool;
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
17
293
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
18 /*!
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
19 @class
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
20
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
21 @brief
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
22
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
23 Cerium の Task で、spawn() でキューに格納されて順次実行される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
24 cpu の指定があれば並列に実行される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
25 特定の Task を待ち合わせる事が可能。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
26 Task の入出力は dma などで copy される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
27 */
688
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
28
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
29 #include "SimpleTask.h"
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
30
641
0605f27ba7d9 Regression on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 634
diff changeset
31 class HTask : public SimpleTask {
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 public:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 BASE_NEW_DELETE(HTask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
35 QueueInfo<TaskQueue> *wait_me; // List of task waiting for me
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
36 QueueInfo<TaskQueue> *wait_i; // List of task for which I am waiting
546
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
37 PostFunction post_func;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 499
diff changeset
38 void *post_arg1;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 499
diff changeset
39 void *post_arg2;
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 CPU_TYPE cpu_type;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 TaskManagerImpl *mimpl;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 480
diff changeset
43 HTask *waiter;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 480
diff changeset
44 HTask *next;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 480
diff changeset
45 HTask *prev;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 480
diff changeset
46
941
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
47 struct {
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
48 unsigned no_auto_free:1; // bit 0 auto free flag (0 .. auto, 1 manual)
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
49 } flag;
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
50
689
ecf63089f5bb Task Array generation worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
51 void spawn();
293
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
52 void wait_for(HTask *);
397
ce86b0186a4a delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 366
diff changeset
53 void set_cpu(CPU_TYPE type);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 499
diff changeset
54 void set_post(PostFunction func, void *read, void *write);
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 689
diff changeset
55 Task *create_task_array(int task_id, int num_task, int num_param, int num_inData, int num_outData);
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 689
diff changeset
56 Task *next_task_array(int task_id, Task *t);
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 689
diff changeset
57 void spawn_task_array(Task *t);
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
58
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
59 HTask *init(int cmd, memaddr rbuf, int rs, memaddr wbuf, int ws) {
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
60 init(cmd);
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
61 set_input(rbuf, rs);
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
62 set_output(wbuf, ws);
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
63 return this;
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
64 }
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
65
956
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
66 void initOnce() {
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
67 wait_me = new QueueInfo<TaskQueue>(taskQueuePool);
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
68 wait_i = new QueueInfo<TaskQueue>(taskQueuePool);
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
69 }
197b7e19a345 unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 955
diff changeset
70
958
338523ff6986 add freeOnce()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 956
diff changeset
71 void freeOnce() {
338523ff6986 add freeOnce()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 956
diff changeset
72 delete wait_me;
338523ff6986 add freeOnce()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 956
diff changeset
73 delete wait_i;
338523ff6986 add freeOnce()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 956
diff changeset
74 }
338523ff6986 add freeOnce()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 956
diff changeset
75
713
97adb3fe85c6 remove SIMPLE_TASK conditional
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 703
diff changeset
76 private:
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
77
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
78 int param_index;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
79 int in_index;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
80 int out_index;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
81
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
82 // compatibility
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
83 public: // functions
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
84 void add_inData_t(memaddr addr, int size) {
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
85 Task *t = (Task*)rbuf;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
86 t->set_inData_t(in_index++, addr,size);
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
87 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
88 void add_outData_t(memaddr addr, int size) {
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
89 Task *t = (Task*)rbuf;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
90 t->set_outData_t(out_index++, addr,size);
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
91 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
92 void set_inData_t(int index, memaddr addr, int size) {
949
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
93 #ifdef EARLY_TOUCH
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
94 if ((unsigned long)addr&0xf) {
787
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
95 printf("inData is not aligned. command = %d, index = %d, addr = 0x%lx, size = %d\n",
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
96 command, index, (unsigned long)addr, size);
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
97 }
949
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
98 char *p = (char *)addr; char b = *p;
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
99 p = (char *)(addr+size-1); b += *p;
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
100 #endif
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
101 Task *t = (Task*)rbuf;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
102 t->set_inData_t(index, addr,size);
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
103 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
104 void set_outData_t(int index, memaddr addr, int size) {
949
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
105 #ifdef EARLY_TOUCH
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
106 if ((unsigned long)addr&0xf) {
787
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
107 printf("inData is not aligned. command = %d, index = %d, addr = 0x%lx, size = %d\n",
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
108 command, index, (unsigned long)addr, size);
64f1d80dc650 fix Bulk
yutaka@localhost.localdomain
parents: 714
diff changeset
109 }
949
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
110 char *p = (char *)addr; char b = *p;
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
111 p = (char *)(addr+size-1); b += *p;
5f0135ca75ee word count size fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 945
diff changeset
112 #endif
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
113 Task *t = (Task*)rbuf;
788
93847ae61bd0 ugoita!!
yutaka@localhost.localdomain
parents: 787
diff changeset
114 t->set_outData_t(index, addr,size);
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
115 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
116 void add_param_t(memaddr param) {
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
117 Task *t = (Task*)rbuf;
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
118 t->set_param_t(param_index++, param);
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
119 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
120 void set_param_t(int index, memaddr param) {
945
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
121 if (command==TaskArray1) {
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
122 Task *t = (Task*)rbuf;
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
123 t->set_param_t(index, param);
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
124 } else {
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
125 this->param = param;
9ed1c4a877ca sort example fix ( simple task accepts one param and more compatible with old task)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 941
diff changeset
126 }
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
127 }
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
128
941
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
129 void no_auto_free() {
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
130 flag.no_auto_free = 1;
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
131 }
954
774eba654643 auto_free
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 949
diff changeset
132 void auto_free() {
774eba654643 auto_free
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 949
diff changeset
133 flag.no_auto_free = 0;
774eba654643 auto_free
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 949
diff changeset
134 }
941
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
135
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
136 void init() {
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
137 next = prev = NULL;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
138 waiter = NULL;
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
139 }
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
140
955
6ffeb543e8d4 unify all QueueInfo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 954
diff changeset
141 void init(int cmd) {
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
142 command = cmd;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
143 param_index = 0;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
144 in_index = 0;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
145 out_index = 0;
941
fc6cfaae6de7 add no_auto_free flag on HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
146 flag.no_auto_free = 0;
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
147 self = (memaddr) this;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
148
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
149 post_func = NULL;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
150 mimpl = NULL;
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
151 cpu_type = CPU_PPE;
1089
c0dc96c6f209 htask->init fix.
tkaito
parents: 958
diff changeset
152
c0dc96c6f209 htask->init fix.
tkaito
parents: 958
diff changeset
153 post_arg1 = NULL;
c0dc96c6f209 htask->init fix.
tkaito
parents: 958
diff changeset
154 post_arg2 = NULL;
c0dc96c6f209 htask->init fix.
tkaito
parents: 958
diff changeset
155 from = NULL;
c0dc96c6f209 htask->init fix.
tkaito
parents: 958
diff changeset
156 param = NULL;
714
878ed6e80286 HTask fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 713
diff changeset
157 }
703
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
158 #define add_param(param) add_param_t((memaddr)(param))
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
159 #define set_param(index,param) set_param_t(index, (memaddr) (param))
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
160
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
161 #define add_inData(addr, size) \
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
162 add_inData_t((memaddr)(addr), (size));
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
163 #define add_outData(addr, size) \
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
164 add_outData_t((memaddr)(addr), (size));
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
165
0c8ad8d99656 compatibility
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
166
895
b662e9dd26b0 add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 788
diff changeset
167 } __attribute__ ((aligned (DEFAULT_ALIGNMENT)));
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
168
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
169 typedef HTask* HTaskPtr;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
170
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
171 #endif