Mercurial > hg > Gears > GearsAgda
comparison src/parallel_execution/examples/twice/main.cbc @ 443:ff2764cb5edb
Fix segmentation fault of examples
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Nov 2017 09:28:27 +0900 |
parents | 7679093bdd72 |
children | 57132ef16009 |
comparison
equal
deleted
inserted
replaced
442:481fce540daf | 443:ff2764cb5edb |
---|---|
79 par goto twice(array1, array2, iterate(split), __exit); | 79 par goto twice(array1, array2, iterate(split), __exit); |
80 par goto printArray(array2, time, __exit); | 80 par goto printArray(array2, time, __exit); |
81 goto code2(); | 81 goto code2(); |
82 } | 82 } |
83 | 83 |
84 __code code2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) { | 84 __code code2(struct TaskManager* taskManager) { |
85 goto taskManager->shutdown(exit_code); | 85 goto taskManager->shutdown(exit_code); |
86 } | |
87 | |
88 __code code2_stub(struct Context* context) { | |
89 goto code2(context, &Gearef(context, TaskManager)->taskManager->TaskManager); | |
86 } | 90 } |
87 | 91 |
88 void init(int argc, char** argv) { | 92 void init(int argc, char** argv) { |
89 for (int i = 1; argv[i]; ++i) { | 93 for (int i = 1; argv[i]; ++i) { |
90 if (strcmp(argv[i], "-cpu") == 0) | 94 if (strcmp(argv[i], "-cpu") == 0) |