Mercurial > hg > Members > Moririn
diff src/tmp/origin_cs.c @ 86:e06e1a9e569e parallel_execution
create worker
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 18 Jan 2016 17:50:52 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tmp/origin_cs.c Mon Jan 18 17:50:52 2016 +0900 @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include "context.h" + +__code meta(struct Context* context, enum Code next) { + goto (context->code[next])(context); +} + +__code start_code(struct Context* context) { + goto meta(context, context->next); +} + +__code exit_code(struct Context* context) { + free(context->code); + free(context->data); + free(context->heapStart); + goto exit(0); +}