view src/parallel_execution/origin_cs.c @ 101:8987cf13d5bb

Add Allocate macro
author innparusu
date Wed, 02 Mar 2016 19:23:00 +0900
parents 9e139a340bd1
children f31b4e4bf4bb
line wrap: on
line source

#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);
}