# HG changeset patch # User anatofuz # Date 1580717585 -32400 # Node ID 4f72a447d518041c6ac62efb5df1bd7eb08260e0 # Parent 26be78edaf838b21f02eb7f818c5f40d88c3d6ce# Parent 1696f9c2ad0d50bb2595519c3628bdbf58003816 merge diff -r 26be78edaf83 -r 4f72a447d518 src/gearsTools/generate_stub.pl --- 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 { diff -r 26be78edaf83 -r 4f72a447d518 src/proc.cbc --- 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; }