summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2013-02-26 23:52:23 +0000
committerattilio <attilio@FreeBSD.org>2013-02-26 23:52:23 +0000
commit74f58faa151f357af634fba0dcfdee4ab2c2d72f (patch)
tree55bb6ccfbd1aeeb88a3765586fc753518b8a3c3f /sys/vm/vm_object.c
parent820ab571ec81929558d07189d73ec134851ba012 (diff)
downloadFreeBSD-src-74f58faa151f357af634fba0dcfdee4ab2c2d72f.zip
FreeBSD-src-74f58faa151f357af634fba0dcfdee4ab2c2d72f.tar.gz
MFC
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index c9866e8..9d73642 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -195,7 +195,7 @@ vm_object_zinit(void *mem, int size, int flags)
object = (vm_object_t)mem;
bzero(&object->lock, sizeof(object->lock));
- VM_OBJECT_LOCK_INIT(object, "standard vm object");
+ rw_init_flags(&object->lock, "vm object", RW_DUPOK);
/* These are true for any object that has been freed */
object->paging_in_progress = 0;
@@ -204,7 +204,7 @@ vm_object_zinit(void *mem, int size, int flags)
return (0);
}
-void
+static void
_vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
{
@@ -267,7 +267,7 @@ vm_object_init(void)
TAILQ_INIT(&vm_object_list);
mtx_init(&vm_object_list_mtx, "vm object_list", NULL, MTX_DEF);
- VM_OBJECT_LOCK_INIT(kernel_object, "kernel vm object");
+ rw_init(&object->lock, "kernel vm object");
_vm_object_allocate(OBJT_PHYS, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS),
kernel_object);
#if VM_NRESERVLEVEL > 0
@@ -275,7 +275,7 @@ vm_object_init(void)
kernel_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS);
#endif
- VM_OBJECT_LOCK_INIT(kmem_object, "kmem vm object");
+ rw_init(&object->lock, "kmem vm object");
_vm_object_allocate(OBJT_PHYS, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS),
kmem_object);
#if VM_NRESERVLEVEL > 0
OpenPOWER on IntegriCloud