Mercurial > hg > GearsTemplate
annotate 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 |
rev | line source |
---|---|
86 | 1 #include <stdlib.h> |
2 | |
3 #include "context.h" | |
132 | 4 #include "stack.h" |
167 | 5 #include "queue.h" |
86 | 6 |
186 | 7 #include "c/extern.h" |
86 | 8 |
9 __code initContext(struct Context* context) { | |
10 context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; | |
101 | 11 context->code = (__code(**) (struct Context*)) NEWN(ALLOCATE_SIZE, void*); |
12 context->data = NEWN(ALLOCATE_SIZE, union Data*); | |
13 context->heapStart = NEWN(context->heapLimit, char); | |
14 context->heap = context->heapStart; | |
86 | 15 |
187 | 16 // context->codeNum = Exit; |
86 | 17 |
186 | 18 #include "c/codeGearInit.c" |
178 | 19 |
186 | 20 #include "c/dataGearInit.c" |
101 | 21 |
187 | 22 // context->data[D_ActiveQueue] = createSynchronizedQueue(context); |
23 // context->data[D_WaitQueue] = createSynchronizedQueue(context); | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
101
diff
changeset
|
24 |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
25 context->dataNum = D_Queue; |
86 | 26 } |