Mercurial > hg > Members > innparusu > Gears
comparison src/parallel_execution/context.c @ 124:acf0453b1c7a
Fix meta data pointer calculate
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 27 Sep 2016 16:19:31 +0900 |
parents | 4ff6f093b695 |
children | 77e60b6cdace |
comparison
equal
deleted
inserted
replaced
123:4ff6f093b695 | 124:acf0453b1c7a |
---|---|
50 extern __code createTask1_stub(struct Context*); | 50 extern __code createTask1_stub(struct Context*); |
51 extern __code createTask2_stub(struct Context*); | 51 extern __code createTask2_stub(struct Context*); |
52 extern __code createTask3_stub(struct Context*); | 52 extern __code createTask3_stub(struct Context*); |
53 extern __code createTask4_stub(struct Context*); | 53 extern __code createTask4_stub(struct Context*); |
54 extern __code createTask5_stub(struct Context*); | 54 extern __code createTask5_stub(struct Context*); |
55 extern __code createTask6_stub(struct Context*); | |
55 extern __code poll1_stub(struct Context*); | 56 extern __code poll1_stub(struct Context*); |
56 extern __code poll2_stub(struct Context*); | 57 extern __code poll2_stub(struct Context*); |
57 /* extern __code createTask3_stub(struct Context*); */ | 58 /* extern __code createTask3_stub(struct Context*); */ |
58 /* extern __code createTask4_stub(struct Context*); */ | 59 /* extern __code createTask4_stub(struct Context*); */ |
59 extern __code putQueue1_stub(struct Context*); | 60 extern __code putQueue1_stub(struct Context*); |
79 | 80 |
80 __code initContext(struct Context* context) { | 81 __code initContext(struct Context* context) { |
81 context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; | 82 context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; |
82 context->code = (__code(**) (struct Context*)) NEWN(ALLOCATE_SIZE, void*); | 83 context->code = (__code(**) (struct Context*)) NEWN(ALLOCATE_SIZE, void*); |
83 context->data = NEWN(ALLOCATE_SIZE, union Data*); | 84 context->data = NEWN(ALLOCATE_SIZE, union Data*); |
84 context->mData = NEWN(ALLOCATE_SIZE, union Data*); | 85 context->mData = NEWN(ALLOCATE_SIZE, union MetaData*); |
85 context->heapStart = NEWN(context->heapLimit, char); | 86 context->heapStart = NEWN(context->heapLimit, char); |
86 context->heap = context->heapStart; | 87 context->heap = context->heapStart; |
87 | 88 |
88 context->codeNum = Exit; | 89 context->codeNum = Exit; |
89 | 90 |
131 context->code[CreateTask1] = createTask1_stub; | 132 context->code[CreateTask1] = createTask1_stub; |
132 context->code[CreateTask2] = createTask2_stub; | 133 context->code[CreateTask2] = createTask2_stub; |
133 context->code[CreateTask3] = createTask3_stub; | 134 context->code[CreateTask3] = createTask3_stub; |
134 context->code[CreateTask4] = createTask4_stub; | 135 context->code[CreateTask4] = createTask4_stub; |
135 context->code[CreateTask5] = createTask5_stub; | 136 context->code[CreateTask5] = createTask5_stub; |
137 context->code[CreateTask6] = createTask6_stub; | |
136 context->code[Poll1] = poll1_stub; | 138 context->code[Poll1] = poll1_stub; |
137 context->code[Poll2] = poll2_stub; | 139 context->code[Poll2] = poll2_stub; |
138 context->code[PutQueue1] = putQueue1_stub; | 140 context->code[PutQueue1] = putQueue1_stub; |
139 context->code[PutQueue2] = putQueue2_stub; | 141 context->code[PutQueue2] = putQueue2_stub; |
140 context->code[PutQueue3] = putQueue3_stub; | 142 context->code[PutQueue3] = putQueue3_stub; |