annotate Renderer/Test/create_task.cc @ 1479:163220e54cc0 draft

remove hard code for TaskLog
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Tue, 24 Jul 2012 17:15:15 +0900
parents f40558ec00a8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #include <math.h>
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #include <stdlib.h>
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 #include "SceneGraphRoot.h"
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 #include "MainLoop.h"
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 #include "create_task.h"
756
a871b0d9c9ae Test/create_task , create SPE task from application.
hiroki
parents: 755
diff changeset
6 #include "types.h"
1070
yutaka@localhost.localdomain
parents: 768
diff changeset
7 #include "MyFunc.h"
yutaka@localhost.localdomain
parents: 768
diff changeset
8 #include "matrix_calc.h"
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
9 #include "SgChange.h"
756
a871b0d9c9ae Test/create_task , create SPE task from application.
hiroki
parents: 755
diff changeset
10
a871b0d9c9ae Test/create_task , create SPE task from application.
hiroki
parents: 755
diff changeset
11 Property *property, *update_property;
a871b0d9c9ae Test/create_task , create SPE task from application.
hiroki
parents: 755
diff changeset
12
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 // prototype
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
14 static void collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree);
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 static void move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
16 static void createSceneGraphFromProperty(SchedTask *s, void *sgroot, void *arg1);
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
17 //static void createSceneGraphFromProperty(void *sgroot, void *property_, void *update_property_);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
18 static void set_property(Property *p, SceneGraphPtr sg);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
19 static void regist_task(SceneGraphRoot *sgroot);
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 static void
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22 move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 {
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
25 //TaskManager *manager = sgroot->tmanager;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
26 //HTaskPtr property_task = manager->create_task(PropertyTask);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
27 HTaskPtr property_task = sgroot->move_exec_task;
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
28
1412
f40558ec00a8 remove duplicated spe task code source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1393
diff changeset
29 property_task->set_inData(0,property, sizeof(Property));
f40558ec00a8 remove duplicated spe task code source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1393
diff changeset
30 property_task->set_outData(0,update_property, sizeof(Property));
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
31
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
32 //property_task->add_inData((Property *)node->property, sizeof(Property));
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
33 //property_task->add_outData((Property *)node->update_property, sizeof(Property));
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
34 property_task->set_cpu(SPE_ANY);
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
35
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
36 property_task->set_post(createSceneGraphFromProperty, (void *)sgroot, 0);
756
a871b0d9c9ae Test/create_task , create SPE task from application.
hiroki
parents: 755
diff changeset
37 property_task->spawn();
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
38 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
39
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
40 static void
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
41 collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
42 SceneGraphPtr tree)
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
43 {
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
44 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
45
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
46 #if 1
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
47 static void
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
48 createSceneGraphFromProperty(SchedTask *s, void *sgroot_, void *arg1)
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
49 {
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
50 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
51 SceneGraphPtr node;
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
52
762
d77fe7cfad19 Test/create_task.cc work
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 759
diff changeset
53 // ここが allExecute の tree をたどって clone して行くところに相当する
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
54 node = sgroot->createSceneGraph(update_property->name);
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
55 //node = sgroot->createSceneGraph("Ball");
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
56 node->set_move_collision(move, collision);
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
57 node->xyz[0] = update_property->xyz[0];
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
58 node->xyz[1] = update_property->xyz[1];
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
59 node->xyz[2] = update_property->xyz[2];
762
d77fe7cfad19 Test/create_task.cc work
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 759
diff changeset
60
1115
e954ec5d9b96 warning fix.
tkaito
parents: 1109
diff changeset
61 //float scale[] = {1,1,1};
1070
yutaka@localhost.localdomain
parents: 768
diff changeset
62
762
d77fe7cfad19 Test/create_task.cc work
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 759
diff changeset
63 // get matrix
1109
tkaito
parents: 1070
diff changeset
64 get_matrix(node->matrix, node->angle, node->xyz, sgroot->camera->matrix);
762
d77fe7cfad19 Test/create_task.cc work
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 759
diff changeset
65
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
66 sgroot->setSceneData(node);
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
67
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
68 Property *tmp = property;
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
69 property = update_property;
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
70 update_property = tmp;
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
71
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
72 sgroot->move_finish();
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
73 }
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
74 #else
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
75 static void
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
76 createSceneGraphFromProperty(void *sgroot_, void *property_, void *update_property_)
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
77 {
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
78 SceneGraphPtr node;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
79 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
80 Property *property = (Property *)property_;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
81 Property *update_property = (Property *)update_property_;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
82
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
83 node = sgroot->createSceneGraph(update_property->name);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
84 //node = sgroot->createSceneGraph("Ball");
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
85 //node->set_move_collision(move, collision);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
86 node->set_move_collision(move, collision, createSceneGraphFromProperty);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
87 node->xyz[0] = update_property->xyz[0];
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
88 node->xyz[1] = update_property->xyz[1];
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
89 node->xyz[2] = update_property->xyz[2];
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
90 sgroot->setSceneData(node);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
91
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
92 Property *tmp = property;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
93 property = update_property;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
94 update_property = tmp;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
95 }
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
96 #endif
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
97
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
98
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
99 static void
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
100 regist_task(SceneGraphRoot *sgroot)
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
101 {
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
102 TaskManager *manager = sgroot->tmanager;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
103 HTaskPtr property_task = manager->create_task(PropertyTask);
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
104 sgroot->move_exec_task = property_task;
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
105 }
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
106
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
107
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
108
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
109
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
110 static void
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
111 set_property(Property *p, SceneGraphPtr sg)
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
112 {
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
113 p->xyz[0] = sg->xyz[0];
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
114 p->xyz[1] = sg->xyz[1];
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
115 p->xyz[2] = sg->xyz[2];
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
116 p->name = sg->name;
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
117 }
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
118
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
119 MainLoopPtr
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
120 create_task::init(Viewer *viewer, int screen_w, int screen_h)
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
121 {
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
122 // SgChange を使うための2行
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
123 SgChange *sgroot = new SgChange(viewer);
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
124 sgroot->run_init();
762
d77fe7cfad19 Test/create_task.cc work
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 759
diff changeset
125 // 上で書いた regist_task() を登録
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
126 sgroot->sgroot_A->appTaskRegist(regist_task);
758
77f936380930 fix create_task
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 757
diff changeset
127
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
128 property = (Property *)sgroot->manager->allocate(sizeof(Property));
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
129 update_property = (Property *)sgroot->manager->allocate(sizeof(Property));
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
130 /*
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
131 Property *property = (Property *)sgroot->manager->allocate(sizeof(Property));
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
132 Property *update_property = (Property *)sgroot->manager->allocate(sizeof(Property));
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
133 */
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
134
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
135 SceneGraphPtr ball;
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
136
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
137 sgroot->createFromXMLfile("xml_file/Ball.xml");
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
138
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
139 ball = sgroot->createSceneGraph("Ball");
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
140 ball->set_move_collision(move, collision);
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
141 //ball->set_move_collision(move, collision, createSceneGraphFromProperty);
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
142
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
143 ball->xyz[0] = screen_w/2;
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
144 ball->xyz[1] = screen_h/2;
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
145 ball->xyz[2] = 30.0f;
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
146
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
147 //SceneGraph に property を持たせておく
768
06302c1dc87d add add spe/chain_move Test/property_chain, not workd
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 762
diff changeset
148 ball->property = (memaddr)property;
06302c1dc87d add add spe/chain_move Test/property_chain, not workd
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 762
diff changeset
149 ball->update_property = (memaddr)update_property;
759
45f7ab7101ea first of all commit, not work Rendering/Test/create_task
hiroki
parents: 758
diff changeset
150
757
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
151 set_property(property, ball);
2aa6e7150588 change Test/create_task
hiroki
parents: 756
diff changeset
152
755
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
153 sgroot->setSceneData(ball);
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
154
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
155 return sgroot;
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
156 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
157
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
158 extern Application *
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
159 application() {
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
160 return new create_task();
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
161 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
162
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
163 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n";
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
164
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
165 extern int init(TaskManager *manager, int argc, char *argv[]);
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
166 extern void task_initialize();
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
167 static void TMend(TaskManager *manager);
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
168
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
169 int
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
170 TMmain(TaskManager *manager, int argc, char *argv[])
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
171 {
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
172 task_initialize();
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
173 manager->set_TMend(TMend);
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
174 return init(manager, argc, argv);
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
175
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
176 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
177
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
178 void
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
179 TMend(TaskManager *manager)
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
180 {
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
181 printf("test_nogl end\n");
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
182 }
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
183
8aaa29d3e874 add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
184 /* end */