summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-13 19:36:18 +0000
committeralc <alc@FreeBSD.org>2003-04-13 19:36:18 +0000
commiteac23cf75a6a6757fa05e79e75b8895f7e2ca725 (patch)
tree64ccd48661e7d1e3dacfcc1bec8a60ae5f93080b /sys/vm
parent56a4ceacb385a01e4992857049c90123eeb78bc6 (diff)
downloadFreeBSD-src-eac23cf75a6a6757fa05e79e75b8895f7e2ca725.zip
FreeBSD-src-eac23cf75a6a6757fa05e79e75b8895f7e2ca725.tar.gz
Lock some manipulations of the vm object's flags.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_meter.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c
index ae7850a..c988ca8 100644
--- a/sys/vm/vm_meter.c
+++ b/sys/vm/vm_meter.c
@@ -98,9 +98,9 @@ vmtotal(SYSCTL_HANDLER_ARGS)
GIANT_REQUIRED;
mtx_lock(&vm_object_list_mtx);
TAILQ_FOREACH(object, &vm_object_list, object_list) {
- vm_object_lock(object);
+ VM_OBJECT_LOCK(object);
vm_object_clear_flag(object, OBJ_ACTIVE);
- vm_object_unlock(object);
+ VM_OBJECT_UNLOCK(object);
}
mtx_unlock(&vm_object_list_mtx);
/*
@@ -159,10 +159,10 @@ vmtotal(SYSCTL_HANDLER_ARGS)
if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) ||
(object = entry->object.vm_object) == NULL)
continue;
- vm_object_lock(object);
+ VM_OBJECT_LOCK(object);
vm_object_set_flag(object, OBJ_ACTIVE);
paging |= object->paging_in_progress;
- vm_object_unlock(object);
+ VM_OBJECT_UNLOCK(object);
}
vm_map_unlock_read(map);
if (paging)
@@ -174,12 +174,12 @@ vmtotal(SYSCTL_HANDLER_ARGS)
*/
mtx_lock(&vm_object_list_mtx);
TAILQ_FOREACH(object, &vm_object_list, object_list) {
- vm_object_lock(object);
+ VM_OBJECT_LOCK(object);
/*
* devices, like /dev/mem, will badly skew our totals
*/
if (object->type == OBJT_DEVICE) {
- vm_object_unlock(object);
+ VM_OBJECT_UNLOCK(object);
continue;
}
totalp->t_vm += object->size;
@@ -197,7 +197,7 @@ vmtotal(SYSCTL_HANDLER_ARGS)
totalp->t_armshr += object->resident_page_count;
}
}
- vm_object_unlock(object);
+ VM_OBJECT_UNLOCK(object);
}
mtx_unlock(&vm_object_list_mtx);
totalp->t_free = cnt.v_free_count + cnt.v_cache_count;
OpenPOWER on IntegriCloud