diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-04 21:37:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-04 21:37:08 +0000 |
commit | e3286bedbccf3bcd35fc7c7ec318a8d2e0691440 (patch) | |
tree | 96b0b181377a881eef857fb1ded21218fa4c1211 /sys/uvm/uvm_map.c | |
parent | 9a86b5ba260258b5ba3bb8e151309cc4a443f84f (diff) |
uvmspace_unshare() is never used; ok miod
Diffstat (limited to 'sys/uvm/uvm_map.c')
-rw-r--r-- | sys/uvm/uvm_map.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 9741c57b276..f1ddb1e0a86 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.106 2008/10/23 23:54:02 tedu Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.107 2008/11/04 21:37:06 deraadt Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3211,32 +3211,6 @@ uvmspace_share(p1, p2) } /* - * uvmspace_unshare: ensure that process "p" has its own, unshared, vmspace - * - * - XXX: no locking on vmspace - */ - -void -uvmspace_unshare(p) - struct proc *p; -{ - struct vmspace *nvm, *ovm = p->p_vmspace; - - if (ovm->vm_refcnt == 1) - /* nothing to do: vmspace isn't shared in the first place */ - return; - - /* make a new vmspace, still holding old one */ - nvm = uvmspace_fork(ovm); - - pmap_deactivate(p); /* unbind old vmspace */ - p->p_vmspace = nvm; - pmap_activate(p); /* switch to new vmspace */ - - uvmspace_free(ovm); /* drop reference to old vmspace */ -} - -/* * uvmspace_exec: the process wants to exec a new program * * - XXX: no locking on vmspace |