Mercurial > hg > CbC > CbC_xv6
changeset 329:ee19f903218a
tweak_dummy_function
author | anatofuz |
---|---|
date | Sun, 09 Feb 2020 14:54:21 +0900 |
parents | c9daa25b8c3f |
children | e34fb61f280a |
files | src/proc.cbc |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proc.cbc Sun Feb 09 14:40:34 2020 +0900 +++ b/src/proc.cbc Sun Feb 09 14:54:21 2020 +0900 @@ -117,16 +117,9 @@ //PAGEBREAK: 32 // hand-craft the first user process. We link initcode.S into the kernel // as a binary, the linker will generate __binary_initcode_start/_size -void dummy(struct proc *p, char _binary_initcode_start[], char _binary_initcode_size[]) +void cbc_init_vmm_dummy(struct Context* cbc_context, struct proc* p, pde_t* pgdir, char* init, uint sz) { // inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); - goto cbc_init_vmm_dummy(&p->cbc_context, p, p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); - -} - - - -__ncode cbc_init_vmm_dummy(struct Context* cbc_context, struct proc* p, pde_t* pgdir, char* init, uint sz){//:skip struct vm* vm = createvm_impl(cbc_context); // goto vm->init_vmm(vm, pgdir, init, sz , vm->void_ret); @@ -138,6 +131,9 @@ goto meta(cbc_context, vm->init_inituvm); } + + + void userinit(void) { struct proc* p; @@ -152,7 +148,7 @@ panic("userinit: out of memory?"); } - dummy(p, _binary_initcode_start, _binary_initcode_size); + cbc_init_vmm_dummy(&p->cbc_context, p, p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); p->sz = PTE_SZ;