changeset 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 481fce540daf
children 0c024ea61601
files src/parallel_execution/examples/bitonicSort/bitonicSort.cbc src/parallel_execution/examples/twice/main.cbc
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc	Tue Nov 21 09:16:12 2017 +0900
+++ b/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc	Tue Nov 21 09:28:27 2017 +0900
@@ -95,10 +95,14 @@
     goto code2();
 }
 
-__code code2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) {
+__code code2(struct TaskManager* taskManager) {
     goto taskManager->shutdown(exit_code);
 }
 
+__code code2_stub(struct Context* context) {
+    goto code2(context, &Gearef(context, TaskManager)->taskManager->TaskManager);
+}
+
 void init(int argc, char** argv) {
     for (int i = 1; argv[i]; ++i) {
         if (strcmp(argv[i], "-cpu") == 0)
--- a/src/parallel_execution/examples/twice/main.cbc	Tue Nov 21 09:16:12 2017 +0900
+++ b/src/parallel_execution/examples/twice/main.cbc	Tue Nov 21 09:28:27 2017 +0900
@@ -81,10 +81,14 @@
     goto code2();
 }
 
-__code code2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) {
+__code code2(struct TaskManager* taskManager) {
     goto taskManager->shutdown(exit_code);
 }
 
+__code code2_stub(struct Context* context) {
+    goto code2(context, &Gearef(context, TaskManager)->taskManager->TaskManager);
+}
+
 void init(int argc, char** argv) {
     for (int i = 1; argv[i]; ++i) {
         if (strcmp(argv[i], "-cpu") == 0)