summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-05-14 23:09:34 +0000
committeralc <alc@FreeBSD.org>1999-05-14 23:09:34 +0000
commite79d7db00beb4a2937430bdd6fc71ca1c91c6145 (patch)
tree1c85af899d8377c05ffc720589de279d803bb9fe /sys/vm/vm_map.c
parent188a2f4871a753bcb906e6c1502ee302010b2390 (diff)
downloadFreeBSD-src-e79d7db00beb4a2937430bdd6fc71ca1c91c6145.zip
FreeBSD-src-e79d7db00beb4a2937430bdd6fc71ca1c91c6145.tar.gz
Simplify vm_map_find/insert's interface: remove the MAP_COPY_NEEDED option.
It never makes sense to specify MAP_COPY_NEEDED without also specifying MAP_COPY_ON_WRITE, and vice versa. Thus, MAP_COPY_ON_WRITE suffices. Reviewed by: David Greenman <dg@root.com>
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f065a80..f43164e 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.159 1999/03/27 23:46:04 alc Exp $
+ * $Id: vm_map.c,v 1.160 1999/04/04 07:11:02 alc Exp $
*/
/*
@@ -462,11 +462,9 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
return (KERN_NO_SPACE);
protoeflags = 0;
- if (cow & MAP_COPY_NEEDED)
- protoeflags |= MAP_ENTRY_NEEDS_COPY;
if (cow & MAP_COPY_ON_WRITE)
- protoeflags |= MAP_ENTRY_COW;
+ protoeflags |= MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY;
if (cow & MAP_NOFAULT)
protoeflags |= MAP_ENTRY_NOFAULT;
@@ -2806,7 +2804,7 @@ vm_uiomove(mapa, srcobject, cp, cnta, uaddra, npages)
ooffset = cp;
rv = vm_map_insert(map, object, ooffset, start, tend,
- VM_PROT_ALL, VM_PROT_ALL, MAP_COPY_ON_WRITE|MAP_COPY_NEEDED);
+ VM_PROT_ALL, VM_PROT_ALL, MAP_COPY_ON_WRITE);
if (rv != KERN_SUCCESS)
panic("vm_uiomove: could not insert new entry: %d", rv);
OpenPOWER on IntegriCloud