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 missing spinlocks.



details:   https://anonhg.NetBSD.org/src/rev/4f2943b411e5
branches:  trunk
changeset: 516308:4f2943b411e5
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Oct 21 00:04:42 2001 +0000

description:
add some missing spinlocks.

diffstat:

 sys/uvm/uvm_anon.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r af1c79623a1f -r 4f2943b411e5 sys/uvm/uvm_anon.c
--- a/sys/uvm/uvm_anon.c        Sat Oct 20 22:30:31 2001 +0000
+++ b/sys/uvm/uvm_anon.c        Sun Oct 21 00:04:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_anon.c,v 1.18 2001/09/15 20:36:44 chs Exp $        */
+/*     $NetBSD: uvm_anon.c,v 1.19 2001/10/21 00:04:42 chs Exp $        */
 
 /*
  *
@@ -235,6 +235,7 @@
                         */
 
                        KASSERT((pg->flags & PG_RELEASED) == 0);
+                       simple_lock(&anon->an_lock);
                        pmap_page_protect(pg, VM_PROT_NONE);
                        while ((pg = anon->u.an_page) &&
                               (pg->flags & PG_BUSY) != 0) {
@@ -248,6 +249,7 @@
                                uvm_pagefree(pg);
                                uvm_unlock_pageq();
                        }
+                       simple_unlock(&anon->an_lock);
                        UVMHIST_LOG(maphist, "anon 0x%x, page 0x%x: "
                                    "freed now!", anon, pg, 0, 0);
                }



Home | Main Index | Thread Index | Old Index