Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Update uvmexp.nswget with atomics.



details:   https://anonhg.NetBSD.org/src/rev/71673cff5255
branches:  trunk
changeset: 967556:71673cff5255
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Dec 14 15:34:18 2019 +0000

description:
Update uvmexp.nswget with atomics.

diffstat:

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

diffs (27 lines):

diff -r 1e8062b2aa7d -r 71673cff5255 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Sat Dec 14 15:30:37 2019 +0000
+++ b/sys/uvm/uvm_swap.c        Sat Dec 14 15:34:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.183 2019/12/01 23:14:47 uwe Exp $       */
+/*     $NetBSD: uvm_swap.c,v 1.184 2019/12/14 15:34:18 ad Exp $        */
 
 /*
  * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.183 2019/12/01 23:14:47 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.184 2019/12/14 15:34:18 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_compat_netbsd.h"
@@ -1738,7 +1738,7 @@
 {
        int error;
 
-       uvmexp.nswget++;
+       atomic_inc_uint(&uvmexp.nswget);
        KASSERT(flags & PGO_SYNCIO);
        if (swslot == SWSLOT_BAD) {
                return EIO;



Home | Main Index | Thread Index | Old Index