Mercurial > hg > Members > Moririn
annotate src/parallel_execution/origin_cs.c @ 223:8d2519c3a36e
Add input data gear example
author | one |
---|---|
date | Wed, 11 Jan 2017 17:19:53 +0900 |
parents | bd11fa6891b6 |
children |
rev | line source |
---|---|
86 | 1 #include <stdlib.h> |
140 | 2 #include <stdio.h> |
86 | 3 #include "context.h" |
4 | |
5 __code meta(struct Context* context, enum Code next) { | |
141
4f6a660c14a1
stack interface worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
140
diff
changeset
|
6 // printf("meta %d\n",next); |
86 | 7 goto (context->code[next])(context); |
8 } | |
9 | |
10 __code start_code(struct Context* context) { | |
11 goto meta(context, context->next); | |
12 } | |
13 | |
206
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
14 __code start_code_stub(struct Context* context) { |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
15 goto start_code(context); |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
16 } |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
17 |
86 | 18 __code exit_code(struct Context* context) { |
19 free(context->code); | |
20 free(context->data); | |
21 free(context->heapStart); | |
22 goto exit(0); | |
23 } | |
206
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
24 |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
25 __code exit_code_stub(struct Context* context) { |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
26 goto exit_code(context); |
bd11fa6891b6
Add stub to origin_cs
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
27 } |