Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Use rw_lock_op().



details:   https://anonhg.NetBSD.org/src/rev/f8f6dc0b81e1
branches:  trunk
changeset: 745169:f8f6dc0b81e1
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Feb 23 21:36:29 2020 +0000

description:
Use rw_lock_op().

diffstat:

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

diffs (28 lines):

diff -r 161c96afe2c5 -r f8f6dc0b81e1 sys/uvm/uvm_anon.c
--- a/sys/uvm/uvm_anon.c        Sun Feb 23 20:41:41 2020 +0000
+++ b/sys/uvm/uvm_anon.c        Sun Feb 23 21:36:29 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_anon.c,v 1.72 2020/02/23 15:46:43 ad Exp $ */
+/*     $NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.72 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -279,8 +279,7 @@
                                 * XXX Better than yielding but inadequate.
                                 */
                                mutex_exit(&pg->interlock);
-                               op = rw_write_held(anon->an_lock)
-                                   ? RW_WRITER : RW_READER;
+                               op = rw_lock_op(anon->an_lock);
                                rw_exit(anon->an_lock);
                                kpause("lkloanpg", false, 1, NULL);
                                rw_enter(anon->an_lock, op);



Home | Main Index | Thread Index | Old Index