Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-pagecache]: src/sys/uvm - assertions
details: https://anonhg.NetBSD.org/src/rev/54d895e4d65e
branches: yamt-pagecache
changeset: 770851:54d895e4d65e
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Dec 28 13:22:47 2011 +0000
description:
- assertions
- __unused
diffstat:
sys/uvm/uvm_fault.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (46 lines):
diff -r 7a885a2927ae -r 54d895e4d65e sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Wed Dec 28 13:21:27 2011 +0000
+++ b/sys/uvm/uvm_fault.c Wed Dec 28 13:22:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.190.2.3 2011/12/26 16:03:10 yamt Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.190.2.4 2011/12/28 13:22:47 yamt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.190.2.3 2011/12/26 16:03:10 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.190.2.4 2011/12/28 13:22:47 yamt Exp $");
#include "opt_uvmhist.h"
@@ -276,6 +276,7 @@
UVMHIST_FUNC("uvmfault_anonget"); UVMHIST_CALLED(maphist);
KASSERT(mutex_owned(anon->an_lock));
KASSERT(anon->an_lock == amap->am_lock);
+ KASSERT(amap->am_obj_lock == NULL || mutex_owned(amap->am_obj_lock));
/* Increment the counters.*/
uvmexp.fltanget++;
@@ -297,6 +298,9 @@
*/
we_own = false;
pg = anon->an_page;
+ KASSERT(pg == NULL || pg->uanon == anon);
+ KASSERT(pg == NULL || pg->uobject == NULL ||
+ pg->uobject->vmobjlock == amap->am_obj_lock);
/*
* If there is a resident page and it is loaned, then anon
@@ -1374,7 +1378,8 @@
/* >1 case is already ok */
if (anon->an_ref == 1) {
- struct uvm_object *uobj = anon->an_page->uobject;
+ struct uvm_object * const uobj __unused =
+ anon->an_page->uobject;
KASSERT(uobj == NULL ||
uobj->vmobjlock == amap->am_obj_lock);
Home |
Main Index |
Thread Index |
Old Index