Mercurial > hg > Gears > GearsAgda
view src/parallel_execution/context.c @ 226:68c03e7057d9
get arg
author | mir3636 |
---|---|
date | Tue, 17 Jan 2017 18:11:39 +0900 |
parents | bacc37265386 |
children | 865179a0a56d |
line wrap: on
line source
#include <stdlib.h> #include "context.h" #include "stack.h" #include "queue.h" #include "c/extern.h" __code initContext(struct Context* context) { context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; context->code = (__code(**) (struct Context*)) NEWN(ALLOCATE_SIZE, void*); context->data = NEWN(ALLOCATE_SIZE, union Data*); context->heapStart = NEWN(context->heapLimit, char); context->heap = context->heapStart; // context->codeNum = Exit; #include "c/codeGearInit.c" #include "c/dataGearInit.c" // context->data[D_ActiveQueue] = createSynchronizedQueue(context); // context->data[D_WaitQueue] = createSynchronizedQueue(context); context->dataNum = D_Queue; }