# HG changeset patch # User anatofuz # Date 1581226834 -32400 # Node ID c9daa25b8c3fc8e6bfec201814b1944c554be5d6 # Parent 6db8be34be04933901a288def1e608144ccc5d9a remove_switchuvm_dummy diff -r 6db8be34be04 -r c9daa25b8c3f src/proc.cbc --- 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; }