aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_mmap.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2007-05-18 07:10:50 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-05-18 07:10:50 +0000
commit222d01951f8677015e3e96c6950e809c0d983c09 (patch)
treec94b660d4b9246fed8cbeadf7851932258d8b72a /sys/vm/vm_mmap.c
parent2b7e2ee7a505adbd7f7355bcaadd8573174464e6 (diff)
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes to use atomics for all counters now. This means sched lock is no longer responsible for protecting counts in the switch routines. Contributed by: Attilio Rao <attilio@FreeBSD.org>
Notes
Notes: svn path=/head/; revision=169667
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r--sys/vm/vm_mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index ff1ba18bea8f..901ff13d0ecd 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -974,7 +974,7 @@ mlock(td, uap)
return (ENOMEM);
}
PROC_UNLOCK(proc);
- if (npages + cnt.v_wire_count > vm_page_max_wired)
+ if (npages + VMCNT_GET(wire_count) > vm_page_max_wired)
return (EAGAIN);
error = vm_map_wire(&proc->p_vmspace->vm_map, start, end,
VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES);