changeset 308:50fd5d414066

add write back context at vm_impl_private
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 05 Feb 2020 15:52:52 +0900
parents 75dda11aaa73
children 14845ce8254b
files src/impl/vm_impl_private.cbc
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/impl/vm_impl_private.cbc	Wed Feb 05 15:23:09 2020 +0900
+++ b/src/impl/vm_impl_private.cbc	Wed Feb 05 15:52:52 2020 +0900
@@ -61,10 +61,10 @@
     } 
     pa = PTE_ADDR(*pte);
 
-    vm_impl->pte = pte; 
-    vm_impl->pgdir = pgdir; 
-    vm_impl->addr = addr; 
-    vm_impl->pa = pa; 
+    Gearef(cbc_context, vm_impl)->pte   = pte;
+    Gearef(cbc_context, vm_impl)->pgdir = pgdir;
+    Gearef(cbc_context, vm_impl)->addr  = addr;
+    Gearef(cbc_context, vm_impl)->pa    = pa;
 
     goto loaduvm_check_PTE_SZ(vm_impl, next(ret, ...));
 }
@@ -82,7 +82,7 @@
         goto next(ret, ...);
     }
 
-    vm_impl->n = n;
+    Gearef(cbc_context, vm_impl)->n = n;
  
     goto loaduvm_loopvm_impl(vm_impl, next(ret, ...));
 }
@@ -342,6 +342,11 @@
     len -= n;
     buf += n;
     va = va0 + PTE_SZ;
+    Gearef(cbc_context, vm_impl)->n = n;
+    Gearef(cbc_context, vm_impl)->len = len;
+    Gearef(cbc_context, vm_impl)->buf = buf;
+    Gearef(cbc_context, vm_impl)->va = va;
+
     goto copyout_loopvm_impl(vm_impl, pgdir, va, pp, len, va0, pa0, next(...));
 }