Mercurial > hg > Members > menikon > CbC_xv6
changeset 204:758909fc5c60
tweak
author | anatofuz |
---|---|
date | Thu, 23 Jan 2020 14:55:04 +0900 |
parents | 9fb193a2c352 |
children | 3cac4139b31d |
files | src/impl/vm_impl.cbc |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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, Isa> 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(...); } -