annotate Renderer/Test/create_task.cc @ 763:87390c99c900

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