Mercurial > hg > Members > Moririn
annotate src/parallel_execution/origin_cs.c @ 141:4f6a660c14a1 stack-interface
stack interface worked
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 09 Nov 2016 15:43:22 +0900 |
parents | f31b4e4bf4bb |
children | bd11fa6891b6 |
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 | |
14 __code exit_code(struct Context* context) { | |
15 free(context->code); | |
16 free(context->data); | |
17 free(context->heapStart); | |
18 goto exit(0); | |
19 } |