Mercurial > hg > CbC > CbC_xv6
changeset 328:c9daa25b8c3f
remove_switchuvm_dummy
author | anatofuz |
---|---|
date | Sun, 09 Feb 2020 14:40:34 +0900 |
parents | 6db8be34be04 |
children | ee19f903218a |
files | src/proc.cbc |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proc.cbc Sat Feb 08 20:45:42 2020 +0900 +++ b/src/proc.cbc Sun Feb 09 14:40:34 2020 +0900 @@ -175,13 +175,8 @@ } -void switchuvm_dummy(struct proc* proc) +void switchuvm_dummy(struct Context* cbc_context, struct proc* proc) { - goto cbc_switchuvm_dummy(&proc->cbc_context, proc); -} - -__ncode cbc_switchuvm_dummy(struct Context* cbc_context, struct proc* proc){ - struct vm* vm = createvm_impl(cbc_context); Gearef(cbc_context, vm)->vm = (union Data*) vm; Gearef(cbc_context, vm)->p = proc; @@ -189,6 +184,7 @@ goto meta(cbc_context, vm->switchuvm); } + // Grow current process's memory by n bytes. // Return 0 on success, -1 on failure. int growproc(int n) @@ -210,7 +206,7 @@ proc->sz = sz; //switchuvm(proc); - switchuvm_dummy(proc); + switchuvm_dummy(&proc->cbc_context, proc); return 0; }