Mercurial > hg > GearsTemplate
view src/parallel_execution/context.c @ 222:77faa28128b4
Add taskSend for TaskManager
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 11 Jan 2017 16:52:27 +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; }