Mercurial > hg > GearsTemplate
view src/parallel_execution/context.c @ 187:bacc37265386
main.o fixed
author | mir3636 |
---|---|
date | Thu, 15 Dec 2016 19:51:40 +0900 |
parents | dbc064c26b98 |
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; }