Module Name: src
Committed By: yamt
Date: Wed Mar 6 11:42:18 UTC 2013
Modified Files:
src/sys/rump/librump/rumpkern: vm.c
Log Message:
simplify code
add a comment
To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/rump/librump/rumpkern/vm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.135 src/sys/rump/librump/rumpkern/vm.c:1.136
--- src/sys/rump/librump/rumpkern/vm.c:1.135 Tue Jan 29 21:26:24 2013
+++ src/sys/rump/librump/rumpkern/vm.c Wed Mar 6 11:42:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.135 2013/01/29 21:26:24 para Exp $ */
+/* $NetBSD: vm.c,v 1.136 2013/03/06 11:42:18 yamt Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.135 2013/01/29 21:26:24 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.136 2013/03/06 11:42:18 yamt Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -252,6 +252,18 @@ uvm_pagezero(struct vm_page *pg)
}
/*
+ * uvm_page_locked_p: return true if object associated with page is
+ * locked. this is a weak check for runtime assertions only.
+ */
+
+bool
+uvm_page_locked_p(struct vm_page *pg)
+{
+
+ return mutex_owned(pg->uobject->vmobjlock);
+}
+
+/*
* Misc routines
*/
@@ -361,16 +373,6 @@ uvmspace_init(struct vmspace *vm, struct
vm->vm_refcnt = 1;
}
-bool
-uvm_page_locked_p(struct vm_page *pg)
-{
-
- if (pg->uobject != NULL) {
- return mutex_owned(pg->uobject->vmobjlock);
- }
- return true;
-}
-
void
uvm_pagewire(struct vm_page *pg)
{