aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2010-12-20 22:49:31 +0000
committerAlan Cox <alc@FreeBSD.org>2010-12-20 22:49:31 +0000
commitacd11c74999edad48185afb907d5b80e7302c3d1 (patch)
treef6dd1a0aa7e3213a5adcdd9bdd3123f868ee9dea /sys/vm/vm_map.h
parent091c4c86d128d6ded26ff09e99257332cf1d3276 (diff)
downloadsrc-acd11c74999edad48185afb907d5b80e7302c3d1.tar.gz
src-acd11c74999edad48185afb907d5b80e7302c3d1.zip
Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race
condition in proc_rwmem() and to (2) simplify the implementation of the cxgb driver's vm_fault_hold_user_pages(). Specifically, in proc_rwmem() the requested read or write could fail because the targeted page could be reclaimed between the calls to vm_fault() and vm_page_hold(). In collaboration with: kib@ MFC after: 6 weeks
Notes
Notes: svn path=/head/; revision=216604
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index fecbffea129d..7ad06b3701a8 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -325,6 +325,7 @@ long vmspace_wired_count(struct vmspace *vmspace);
*/
#define VM_FAULT_NORMAL 0 /* Nothing special */
#define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */
+#define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */
/*
* The following "find_space" options are supported by vm_map_find()