Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm add some locking assertions.



details:   https://anonhg.NetBSD.org/src/rev/0ad8b91beef5
branches:  trunk
changeset: 574445:0ad8b91beef5
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Feb 28 15:31:04 2005 +0000

description:
add some locking assertions.

diffstat:

 sys/uvm/uvm_amap_i.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r 667ef874ff9b -r 0ad8b91beef5 sys/uvm/uvm_amap_i.h
--- a/sys/uvm/uvm_amap_i.h      Mon Feb 28 15:21:25 2005 +0000
+++ b/sys/uvm/uvm_amap_i.h      Mon Feb 28 15:31:04 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap_i.h,v 1.20 2002/12/20 18:21:13 atatat Exp $   */
+/*     $NetBSD: uvm_amap_i.h,v 1.21 2005/02/28 15:31:04 chs Exp $      */
 
 /*
  *
@@ -59,6 +59,7 @@
        int slot;
        struct vm_amap *amap = aref->ar_amap;
        UVMHIST_FUNC("amap_lookup"); UVMHIST_CALLED(maphist);
+       LOCK_ASSERT(simple_lock_held(&amap->am_l));
 
        AMAP_B2SLOT(slot, offset);
        slot += aref->ar_pageoff;
@@ -87,6 +88,7 @@
        int slot;
        struct vm_amap *amap = aref->ar_amap;
        UVMHIST_FUNC("amap_lookups"); UVMHIST_CALLED(maphist);
+       LOCK_ASSERT(simple_lock_held(&amap->am_l));
 
        AMAP_B2SLOT(slot, offset);
        slot += aref->ar_pageoff;
@@ -120,6 +122,7 @@
        int slot;
        struct vm_amap *amap = aref->ar_amap;
        UVMHIST_FUNC("amap_add"); UVMHIST_CALLED(maphist);
+       LOCK_ASSERT(simple_lock_held(&amap->am_l));
 
        AMAP_B2SLOT(slot, offset);
        slot += aref->ar_pageoff;
@@ -166,6 +169,7 @@
        int ptr, slot;
        struct vm_amap *amap = aref->ar_amap;
        UVMHIST_FUNC("amap_unadd"); UVMHIST_CALLED(maphist);
+       LOCK_ASSERT(simple_lock_held(&amap->am_l));
 
        AMAP_B2SLOT(slot, offset);
        slot += aref->ar_pageoff;



Home | Main Index | Thread Index | Old Index