Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Replace locking checks with uvm_page_locked_p.
details: https://anonhg.NetBSD.org/src/rev/697ec67553dc
branches: trunk
changeset: 773135:697ec67553dc
user: matt <matt%NetBSD.org@localhost>
date: Sat Jan 28 15:43:34 2012 +0000
description:
Replace locking checks with uvm_page_locked_p.
diffstat:
sys/uvm/uvm_page.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diffs (45 lines):
diff -r 5fd8584df532 -r 697ec67553dc sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Sat Jan 28 15:10:24 2012 +0000
+++ b/sys/uvm/uvm_page.c Sat Jan 28 15:43:34 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.179 2012/01/27 19:48:41 para Exp $ */
+/* $NetBSD: uvm_page.c,v 1.180 2012/01/28 15:43:34 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.179 2012/01/27 19:48:41 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.180 2012/01/28 15:43:34 matt Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -1623,11 +1623,7 @@
continue;
}
- KASSERT(pg->uobject == NULL ||
- mutex_owned(pg->uobject->vmobjlock));
- KASSERT(pg->uobject != NULL ||
- (pg->uanon != NULL && mutex_owned(pg->uanon->an_lock)));
-
+ KASSERT(uvm_page_locked_p(pg));
KASSERT(pg->flags & PG_BUSY);
KASSERT((pg->flags & PG_PAGEOUT) == 0);
if (pg->flags & PG_WANTED) {
@@ -1668,12 +1664,7 @@
uobj = pg->uobject;
anon = pg->uanon;
- if (uobj != NULL) {
- KASSERT(mutex_owned(uobj->vmobjlock));
- } else if (anon != NULL) {
- KASSERT(mutex_owned(anon->an_lock));
- }
-
+ KASSERT(uvm_page_locked_p(pg));
KASSERT((pg->flags & PG_WANTED) == 0);
/* gain ownership? */
Home |
Main Index |
Thread Index |
Old Index