changeset 205:3cac4139b31d

send arg at vm_impl
author tobaru
date Thu, 23 Jan 2020 15:43:36 +0900
parents 758909fc5c60
children 247aa9ee931c
files src/impl/vm_impl.cbc src/impl/vm_impl.h src/impl/vm_impl_private.cbc
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/impl/vm_impl.cbc	Thu Jan 23 14:55:04 2020 +0900
+++ b/src/impl/vm_impl.cbc	Thu Jan 23 15:43:36 2020 +0900
@@ -68,9 +68,14 @@
     goto next(...);
 }
 
-__code loaduvmvm_impl(struct vm_impl* vm,pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz,  __code next(...)) {
-
-    goto next(...);
+__code loaduvmvm_impl(struct vm_impl* vm, pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz,  __code next(...)) {
+    vm->pgdir = pgdir;
+    vm->addr = addr;
+    vm->ip = ip;
+    vm->offset = offset;
+    vm->sz = sz;
+    
+    goto loaduvm_ptesize_checkvm_impl(vm, next);
 }
 
 __code allocuvmvm_impl(struct vm_impl* vm, pde_t* pgdir, uint oldsz, uint newsz, __code next(...)) {
--- a/src/impl/vm_impl.h	Thu Jan 23 14:55:04 2020 +0900
+++ b/src/impl/vm_impl.h	Thu Jan 23 15:43:36 2020 +0900
@@ -3,7 +3,11 @@
     uint i;
     pte_t* pte;
     uint sz;
- 
+    pde_t* pgdir;
+    char* addr;
+    struct inode* ip;
+    uint offset;
+
     __code loaduvm_ptesize_check(Type* vm_impl, __code next(...));
     __code loaduvm_loop(Type* vm_impl, uint i, pte_t* pte, uint sz, __code next(...));
     __code next(...);
--- a/src/impl/vm_impl_private.cbc	Thu Jan 23 14:55:04 2020 +0900
+++ b/src/impl/vm_impl_private.cbc	Thu Jan 23 15:43:36 2020 +0900
@@ -2,6 +2,8 @@
 #interface "vm_impl.h"
 
 __code loaduvm_ptesize_checkvm_impl(struct vm_impl* vm_impl) {
+    
+    
     goto vm_impl->next();
 }