Mercurial > hg > Gears > GearsAgda
comparison src/parallel_execution/generate_context.pl @ 280:2c2e4e597eb0
generate no compile errors
author | mir3636 |
---|---|
date | Fri, 03 Feb 2017 17:47:27 +0900 |
parents | 23767f714f4a |
children | e6bc0a4c2c36 |
comparison
equal
deleted
inserted
replaced
279:b5e8fce400a5 | 280:2c2e4e597eb0 |
---|---|
148 | 148 |
149 // context->codeNum = Exit; | 149 // context->codeNum = Exit; |
150 | 150 |
151 $code_init | 151 $code_init |
152 | 152 |
153 context->code[C_start_code] = start_code_stub; | |
154 context->code[C_exit_code] = exit_code_stub; | |
155 | |
153 #include "dataGearInit.c" | 156 #include "dataGearInit.c" |
154 | 157 |
155 // context->data[D_ActiveQueue] = createSynchronizedQueue(context); | 158 // context->data[D_ActiveQueue] = createSynchronizedQueue(context); |
156 // context->data[D_WaitQueue] = createSynchronizedQueue(context); | 159 // context->data[D_WaitQueue] = createSynchronizedQueue(context); |
157 | 160 |
163 print $fd $context_c; | 166 print $fd $context_c; |
164 | 167 |
165 my $meta_call = <<"EOFEOF"; | 168 my $meta_call = <<"EOFEOF"; |
166 | 169 |
167 __code meta(struct Context* context, enum Code next) { | 170 __code meta(struct Context* context, enum Code next) { |
168 // printf("meta %d\n",next); | 171 // printf("meta %d\\n",next); |
169 goto (context->code[next])(context); | 172 goto (context->code[next])(context); |
170 } | 173 } |
171 | 174 |
172 __code start_code(struct Context* context) { | 175 __code start_code(struct Context* context) { |
173 goto meta(context, context->next); | 176 goto meta(context, context->next); |
186 | 189 |
187 __code exit_code_stub(struct Context* context) { | 190 __code exit_code_stub(struct Context* context) { |
188 goto exit_code(context); | 191 goto exit_code(context); |
189 } | 192 } |
190 | 193 |
191 // end $context_c | 194 // end context_c |
192 EOFEOF | 195 EOFEOF |
193 | 196 |
194 print $fd $meta_call; | 197 print $fd $meta_call; |
195 | 198 |
196 open my $fd,">","$ddir/enumData.h" or die("can't open $ddir/enumData.h $!"); | 199 open my $fd,">","$ddir/enumData.h" or die("can't open $ddir/enumData.h $!"); |