changeset 286:4f72a447d518

merge
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 03 Feb 2020 17:13:05 +0900
parents 26be78edaf83 (current diff) 1696f9c2ad0d (diff)
children f0821818e3ed
files src/gearsTools/generate_stub.pl
diffstat 2 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gearsTools/generate_stub.pl	Mon Feb 03 17:12:35 2020 +0900
+++ b/src/gearsTools/generate_stub.pl	Mon Feb 03 17:13:05 2020 +0900
@@ -3,6 +3,7 @@
 use strict;
 use Getopt::Std;
 use File::Path qw(make_path);
+use Data::Dumper;
 
 # interface.h
 # typedef struct Worker {
@@ -159,6 +160,7 @@
         }
     }
 
+    print Dumper \%var;
 }
 
 sub getCodeGear {
--- a/src/proc.cbc	Mon Feb 03 17:12:35 2020 +0900
+++ b/src/proc.cbc	Mon Feb 03 17:13:05 2020 +0900
@@ -174,6 +174,19 @@
     p->state = RUNNABLE;
 }
 
+
+void switchuvm_dummy(struct proc* proc)
+{
+    goto cbc_switchuvm_dummy(&proc->cbc_context, proc);
+}
+
+__ncode cbc_switchuvm_dummy(struct Context* cbc_context, struct proc* proc){
+
+    struct vm* vm = createvm_impl(cbc_context);
+    Gearef(cbc_context, vm)->vm = (union Data*) vm;
+    goto meta(cbc_context, vm->switchuvm);
+}
+
 // Grow current process's memory by n bytes.
 // Return 0 on success, -1 on failure.
 int growproc(int n)
@@ -194,7 +207,8 @@
     }
 
     proc->sz = sz;
-    switchuvm(proc);
+    // switchuvm(proc);
+    switchuvm_dummy(proc);
 
     return 0;
 }