Mercurial > hg > GearsTemplate
view src/parallel_execution/context.c @ 236:865179a0a56d
fix taskManager
author | ikkun |
---|---|
date | Mon, 23 Jan 2017 20:00:46 +0900 |
parents | bacc37265386 |
children |
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; context->idgCount = 0; #include "c/codeGearInit.c" #include "c/dataGearInit.c" // context->data[D_ActiveQueue] = createSynchronizedQueue(context); // context->data[D_WaitQueue] = createSynchronizedQueue(context); context->dataNum = D_Queue; }