changeset 231:24da4f217447

fix
author mir3636
date Sun, 22 Jan 2017 18:19:23 +0900
parents a1fb3f2d1a36
children 123b0d277b84
files src/parallel_execution/generate_stub.pl src/parallel_execution/taskManager.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/generate_stub.pl	Sat Jan 21 20:21:00 2017 +0900
+++ b/src/parallel_execution/generate_stub.pl	Sun Jan 22 18:19:23 2017 +0900
@@ -76,10 +76,11 @@
     open my $fd,">","d/stub.h" or die("can't open d/stub.h $!");
     for my $codeGearName ( sort keys %dataGearName ) {
         print $fd "__code ", $codeGearName ,"_stub (struct Context* context) {\n";
-	print $fd "\tgoto meta(context, \n";
+	#print $fd "\tgoto meta(context, \n";
+	print $fd "\tgoto meta(";
         chomp($dataGearName{$codeGearName});
         chop($dataGearName{$codeGearName});
-        print $fd $dataGearName{$codeGearName},") \n} \n\n";
+        print $fd $dataGearName{$codeGearName},"); \n} \n\n";
     }
     print $fd "\n";
 }
--- a/src/parallel_execution/taskManager.c	Sat Jan 21 20:21:00 2017 +0900
+++ b/src/parallel_execution/taskManager.c	Sun Jan 22 18:19:23 2017 +0900
@@ -46,6 +46,7 @@
     }
     goto meta(context, TaskManager->next);
 }
+
 __code createWorker1(struct Context* context, struct LoopCounter* loopCounter, struct Worker* worker) {
     int i = loopCounter->i;
 
@@ -65,6 +66,10 @@
     goto meta(context, C_taskManager);
 }
 
+__code createWorker1_stub(struct Context* context) {
+    goto createWorker1(context, &context->data[D_LoopCounter]->LoopCounter,     &context->data[D_Worker]->Worker);
+}
+
 __code shutdownTaskManager(struct Context* context, struct LoopCounter* loopCounter, struct Worker* worker, struct TaskManager* taskManager) {
     int i = loopCounter->i;
 
@@ -72,7 +77,7 @@
         pthread_join(worker->contexts[i].thread, NULL);
         loopCounter->i++;
 
-        goto meta(context, C_shutDownTaskManager);
+        goto meta(context, C_shutdownTaskManager);
     }
 
     loopCounter->i = 0;