Mercurial > hg > Gears > GearsAgda
annotate src/parallel_execution/main.c @ 112:e3cba827d489
Add spawnTask CS
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 03 May 2016 17:29:21 +0900 |
parents | 556e203de999 |
children | f57e9ffa7960 d05b9937aa95 |
rev | line source |
---|---|
86 | 1 #include <stdio.h> |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
2 #include <string.h> |
86 | 3 |
4 #include "context.h" | |
5 #include "origin_cs.h" | |
6 | |
7 extern __code initContext(struct Context* context); | |
90 | 8 extern void allocator(struct Context* context); |
86 | 9 |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
10 int cpu_num = 1; |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
11 int length = 1024; |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
12 int split; |
90 | 13 int* array_ptr; |
14 | |
15 void print_queue(struct Element* element) { | |
16 while (element) { | |
17 printf("%d\n", element->task->key); | |
18 element = element->next; | |
19 } | |
20 } | |
21 | |
22 void print_tree(struct Node* node) { | |
23 if (node != 0) { | |
24 printf("%d\n", node->value->array.index); | |
25 print_tree(node->left); | |
26 print_tree(node->right); | |
27 } | |
28 } | |
86 | 29 |
30 __code code1(struct Context* context) { | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
31 printf("cpus:\t\t%d\n", cpu_num); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
32 printf("length:\t\t%d\n", length); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
33 printf("length/task:\t%d\n", length/split); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
34 /* puts("queue"); */ |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
35 /* print_queue(context->data[ActiveQueue]->queue.first); */ |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
36 /* puts("tree"); */ |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
37 /* print_tree(context->data[Tree]->tree.root); */ |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
38 /* puts("result"); */ |
90 | 39 |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
40 context->next = CreateWorker; |
102 | 41 |
42 struct Time *t = &context->data[Time]->time; | |
43 t->next = CreateWorker; | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
44 goto meta(context, StartTime); |
86 | 45 } |
46 | |
47 __code code1_stub(struct Context* context) { | |
48 goto code1(context); | |
49 } | |
50 | |
92 | 51 __code code2(struct Context* context, struct Array* array, struct LoopCounter* loopCounter) { |
52 int i = loopCounter->i; | |
111 | 53 |
92 | 54 if (i < length) { |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
55 // printf("%d\n", array->array[i]); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
56 if (array->array[i] == (i*2)) { |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
57 loopCounter->i++; |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
58 goto meta(context, Code2); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
59 } else |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
60 puts("wrong result"); |
92 | 61 |
62 } | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
63 |
92 | 64 goto meta(context, Exit); |
65 } | |
66 | |
67 __code code2_stub(struct Context* context) { | |
68 goto code2(context, &context->data[Node]->node.value->array, &context->data[LoopCounter]->loopCounter); | |
69 } | |
70 | |
90 | 71 __code createData1(struct Context* context, struct Allocate* allocate, struct LoopCounter* loopCounter) { |
72 int i = loopCounter->i; | |
73 | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
74 if ((length/split*i) < length) { |
90 | 75 allocate->size = sizeof(struct Array); |
76 allocator(context); | |
77 | |
78 goto meta(context, CreateData2); | |
79 } | |
80 | |
92 | 81 loopCounter->i = 0; |
90 | 82 goto meta(context, Code1); |
83 } | |
111 | 84 |
90 | 85 __code createData1_stub(struct Context* context) { |
86 goto createData1(context, &context->data[Allocate]->allocate, &context->data[LoopCounter]->loopCounter); | |
87 } | |
88 | |
89 __code createData2(struct Context* context, struct LoopCounter* loopCounter, struct Array* array, struct Node* node) { | |
90 int i = loopCounter->i; | |
91 | |
92 array->index = i; | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
93 array->prefix = length/split; |
90 | 94 array->array = array_ptr; |
95 | |
96 node->key = i; | |
97 node->value = (union Data*)array; | |
111 | 98 |
90 | 99 context->next = CreateTask1; |
100 | |
101 goto meta(context, PutTree); | |
102 } | |
103 | |
104 __code createData2_stub(struct Context* context) { | |
105 goto createData2(context, | |
111 | 106 &context->data[LoopCounter]->loopCounter, |
107 &context->data[context->dataNum]->array, | |
108 &context->data[Node]->node); | |
90 | 109 } |
110 | |
111 __code createTask1(struct Context* context, struct Allocate* allocate) { | |
112 allocate->size = sizeof(struct Task); | |
113 allocator(context); | |
114 goto meta(context, CreateTask2); | |
115 } | |
116 | |
117 __code createTask1_stub(struct Context* context) { | |
118 goto createTask1(context, &context->data[Allocate]->allocate); | |
119 } | |
120 | |
112 | 121 __code createTask2(struct Context* context, struct Allocate* allocate) { |
122 allocate->size = sizeof(struct Queue); | |
123 allocator(context); | |
124 goto meta(context, CreateTask3); | |
125 } | |
126 | |
127 __code createTask2_stub(struct Context* context) { | |
128 goto createTask2(context, &context->data[Allocate]->allocate); | |
129 } | |
130 | |
131 __code createTask3(struct Context* context, struct Allocate* allocate) { | |
132 allocate->size = sizeof(struct OdsQueue); | |
133 allocator(context); | |
134 goto meta(context, CreateTask4); | |
135 } | |
136 | |
137 __code createTask3_stub(struct Context* context) { | |
138 goto createTask3(context, &context->data[Allocate]->allocate); | |
139 } | |
140 | |
141 __code meta_createTask4(struct Context* context, struct Queue* activeQueue, enum Code next) { | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
142 context->data[Queue] = (union Data *)activeQueue; |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
143 goto (context->code[next])(context); |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
144 } |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
145 |
112 | 146 __code createTask4(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Queue* waitMe, struct OdsQueue* waitI, struct Element* element, struct Queue* activeQueue) { |
90 | 147 int i = loopCounter->i; |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
148 |
112 | 149 waitMe->first = 0; |
150 waitMe->last = 0; | |
151 waitMe->count = 0; | |
152 | |
153 waitI->first = 0; | |
154 waitI->last = 0; | |
155 waitI->count = 0; | |
156 | |
92 | 157 task->code = Twice; |
90 | 158 task->key = i; |
112 | 159 task->waitMe = waitMe; |
160 task->waitI = waitI; | |
161 task->idsCount = 0; | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
162 |
90 | 163 element->task = task; |
164 | |
165 context->next = CreateData1; | |
166 loopCounter->i++; | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
167 |
112 | 168 goto meta(context, SpawnTask); |
90 | 169 } |
170 | |
112 | 171 __code createTask4_stub(struct Context* context) { |
172 goto createTask4(context, | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
173 &context->data[LoopCounter]->loopCounter, |
112 | 174 &context->data[context->dataNum-2]->task, |
175 &context->data[context->dataNum-1]->queue, | |
176 &context->data[context->dataNum]->odsQueue, | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
177 &context->data[Element]->element, |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
178 &context->data[ActiveQueue]->queue); |
90 | 179 } |
180 | |
111 | 181 |
112 | 182 //__code createTask4(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Queue* waitMe, struct OdsQueue* waitI, struct Element* element, struct Queue* activeQueue) { |
111 | 183 // int i = loopCounter->i; |
112 | 184 // |
111 | 185 // task->code = TaskC; |
186 // task->key = i; | |
112 | 187 // task->waitMe = waitMe; |
188 // task->waitI = waitI; | |
189 // task->idsCount = 1; | |
190 // | |
111 | 191 // element->task = task; |
192 // | |
193 // context->next = CreateData1; | |
194 // loopCounter->i++; | |
195 // | |
112 | 196 // goto meta_createTask2(context, activeQueue, PutQueue1); |
111 | 197 //} |
198 // | |
112 | 199 //__code createTask4_stub(struct Context* context) { |
111 | 200 // goto createTask2(context, |
112 | 201 // &context->data[LoopCounter]->loopCounter, |
202 // &context->data[context->dataNum]->task, | |
203 // &context->data[context->dataNum-1]->queue, | |
204 // &context->data[context->dataNum-2]->odsQueue, | |
205 // &context->data[Element]->element, | |
206 // &context->data[ActiveQueue]->queue); | |
111 | 207 //} |
208 // | |
112 | 209 //__code createTask5(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Task* slave, struct Element* element) { |
111 | 210 // int i = loopCounter->i; |
112 | 211 // |
111 | 212 // task->code = TaskB; |
213 // task->key = i; | |
214 // element->task = task; | |
215 // | |
216 // context->next = CreateData1; | |
217 // loopCounter->i++; | |
112 | 218 // |
111 | 219 // goto meta(context, WaitFor1); |
220 //} | |
221 // | |
112 | 222 //__code createTask5_stub(struct Context* context) { |
111 | 223 // goto createTask2(context, |
112 | 224 // &context->data[context->dataNum]->task, |
225 // &context->data[Element]->element); | |
111 | 226 //} |
227 | |
90 | 228 __code putQueue1(struct Context* context, struct Allocate* allocate) { |
229 allocate->size = sizeof(struct Element); | |
230 allocator(context); | |
231 | |
232 goto meta(context, PutQueue2); | |
233 } | |
234 | |
235 __code putQueue1_stub(struct Context* context) { | |
236 goto putQueue1(context, &context->data[Allocate]->allocate); | |
237 } | |
238 | |
239 __code putQueue2(struct Context* context, struct Element* new_element, struct Element* element, struct Queue* queue) { | |
240 new_element->task = element->task; | |
241 | |
242 if (queue->first) | |
243 goto meta(context, PutQueue3); | |
244 else | |
245 goto meta(context, PutQueue4); | |
246 } | |
247 | |
248 __code putQueue2_stub(struct Context* context) { | |
249 goto putQueue2(context, | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
250 &context->data[context->dataNum]->element, |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
251 &context->data[Element]->element, |
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
252 &context->data[Queue]->queue); |
90 | 253 } |
254 | |
255 __code putQueue3(struct Context* context, struct Queue* queue, struct Element* new_element) { | |
256 struct Element* last = queue->last; | |
257 | |
258 if (__sync_bool_compare_and_swap(&queue->last, last, new_element)) { | |
259 last->next = new_element; | |
260 queue->count++; | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
261 |
90 | 262 goto meta(context, context->next); |
263 } else { | |
264 goto meta(context, PutQueue3); | |
265 } | |
266 } | |
267 | |
268 __code putQueue3_stub(struct Context* context) { | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
269 goto putQueue3(context, &context->data[Queue]->queue, &context->data[context->dataNum]->element); |
90 | 270 } |
271 | |
272 __code putQueue4(struct Context* context, struct Queue* queue, struct Element* new_element) { | |
273 if (__sync_bool_compare_and_swap(&queue->first, 0, new_element)) { | |
274 queue->last = new_element; | |
275 queue->count++; | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
276 |
90 | 277 goto meta(context, context->next); |
278 } else { | |
279 goto meta(context, PutQueue3); | |
280 } | |
281 } | |
282 | |
283 __code putQueue4_stub(struct Context* context) { | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
284 goto putQueue4(context, &context->data[Queue]->queue, &context->data[context->dataNum]->element); |
90 | 285 } |
286 | |
86 | 287 __code createWorker(struct Context* context, struct LoopCounter* loopCounter, struct Worker* worker) { |
288 int i = loopCounter->i; | |
289 | |
290 if (i < worker->num) { | |
291 struct Context* worker_context = &worker->contexts[i]; | |
91 | 292 worker_context->next = GetQueue; |
293 worker_context->data[Tree] = context->data[Tree]; | |
294 worker_context->data[ActiveQueue] = context->data[ActiveQueue]; | |
86 | 295 pthread_create(&worker_context->thread, NULL, (void*)&start_code, worker_context); |
92 | 296 worker_context->thread_num = i; |
86 | 297 loopCounter->i++; |
298 | |
299 goto meta(context, CreateWorker); | |
300 } | |
301 | |
302 loopCounter->i = 0; | |
303 goto meta(context, TaskManager); | |
304 } | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
305 |
86 | 306 __code createWorker_stub(struct Context* context) { |
307 goto createWorker(context, &context->data[LoopCounter]->loopCounter, &context->data[Worker]->worker); | |
308 } | |
309 | |
310 __code taskManager(struct Context* context, struct LoopCounter* loopCounter, struct Worker* worker) { | |
311 int i = loopCounter->i; | |
312 | |
313 if (i < worker->num) { | |
314 pthread_join(worker->contexts[i].thread, NULL); | |
315 loopCounter->i++; | |
316 | |
317 goto meta(context, TaskManager); | |
318 } | |
319 | |
320 loopCounter->i = 0; | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
321 |
102 | 322 struct Time *t = &context->data[Time]->time; |
323 t->next = Code2; | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
324 goto meta(context, EndTime); |
86 | 325 } |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
326 |
86 | 327 __code taskManager_stub(struct Context* context) { |
328 goto taskManager(context, &context->data[LoopCounter]->loopCounter, &context->data[Worker]->worker); | |
329 } | |
330 | |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
331 void init(int argc, char** argv) { |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
332 for (int i = 1; argv[i]; ++i) { |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
333 if (strcmp(argv[i], "-cpu") == 0) |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
334 cpu_num = (int)atoi(argv[i+1]); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
335 else if (strcmp(argv[i], "-l") == 0) |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
336 length = (int)atoi(argv[i+1]); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
337 else if (strcmp(argv[i], "-s") == 0) |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
338 split = (int)atoi(argv[i+1]); |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
339 } |
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
340 } |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
341 |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
342 |
86 | 343 int main(int argc, char** argv) { |
95
3e28ee215c0e
modify twice, use OSAtomiceCompareAndSwap
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
92
diff
changeset
|
344 init(argc, argv); |
90 | 345 |
101 | 346 array_ptr = NEWN(length, int); |
90 | 347 |
348 for(int i=0; i<length; i++) | |
349 array_ptr[i]=i; | |
86 | 350 |
101 | 351 struct Context* main_context = NEW(struct Context); |
86 | 352 initContext(main_context); |
90 | 353 main_context->next = CreateData1; |
86 | 354 |
101 | 355 struct Context* worker_contexts = NEWN(cpu_num, struct Context); |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
356 |
86 | 357 struct Worker* worker = &main_context->data[Worker]->worker; |
358 worker->num = cpu_num; | |
359 worker->contexts = worker_contexts; | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
360 |
86 | 361 for (int i = 0;i<cpu_num;i++) |
362 initContext(&worker_contexts[i]); | |
109
059b26a250cc
Change put_queue process
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
102
diff
changeset
|
363 |
86 | 364 goto start_code(main_context); |
365 } |