# HG changeset patch # User anatofuz # Date 1579758904 -32400 # Node ID 758909fc5c609ae9812d0f76bfd46db233a2ca57 # Parent 9fb193a2c352a18b89eec4512f60fa7b67a0daa0 tweak diff -r 9fb193a2c352 -r 758909fc5c60 src/impl/vm_impl.cbc --- a/src/impl/vm_impl.cbc Thu Jan 23 14:42:47 2020 +0900 +++ b/src/impl/vm_impl.cbc Thu Jan 23 14:55:04 2020 +0900 @@ -3,12 +3,13 @@ // ---- // typedef struct vm_impl impl vm{ +// union Data* vm_impl; // uint i; -// pte_t *pte; -// unsigned int sz; +// pte_t* pte; +// uint sz; // // __code loaduvm_ptesize_check(Type* vm_impl, __code next(...)); -// __code loaduvm_loop(Type* vm_impl, uint i, pte_t *pte, unsigned int sz, __code next(...)); +// __code loaduvm_loop(Type* vm_impl, uint i, pte_t* pte, uint sz, __code next(...)); // __code next(...); // // @@ -19,8 +20,12 @@ struct vm* vm = new vm(); struct vm_impl* vm_impl = new vm_impl(); vm->vm = (union Data*)vm_impl; + vm_impl->vm_impl = NULL; vm_impl->i = 0; - vm_impl->sz = 0; + vm_impl->pte = NULL; + vm_impl->sz = 0; + vm_impl->loaduvm_ptesize_check = C_loaduvm_ptesize_checkvm_impl; + vm_impl->loaduvm_loop = C_loaduvm_loopvm_impl; vm->init_vmm = C_init_vmmvm_impl; vm->kpt_freerange = C_kpt_freerangevm_impl; vm->kpt_alloc = C_kpt_allocvm_impl; @@ -37,7 +42,6 @@ } - __code init_vmmvm_impl(struct vm_impl* vm, __code next(...)) { goto next(...); @@ -54,7 +58,7 @@ } typedef struct proc proc; -__code switchuvmvm_impl(struct vm_impl* vm ,struct proc* p, __code next(...)) { //:skip +__code switchuvmvm_impl(struct vm_impl* vm ,struct proc* p, __code next(...)) { //:skip goto next(...); } @@ -99,4 +103,3 @@ goto next(...); } -