Module Name:    src
Committed By:   ad
Date:           Sat Dec 14 15:34:19 UTC 2019

Modified Files:
        src/sys/uvm: uvm_swap.c

Log Message:
Update uvmexp.nswget with atomics.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/uvm/uvm_swap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.183 src/sys/uvm/uvm_swap.c:1.184
--- src/sys/uvm/uvm_swap.c:1.183	Sun Dec  1 23:14:47 2019
+++ src/sys/uvm/uvm_swap.c	Sat Dec 14 15:34:18 2019
@@ -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 @@ uvm_swap_get(struct vm_page *page, int s
 {
 	int error;
 
-	uvmexp.nswget++;
+	atomic_inc_uint(&uvmexp.nswget);
 	KASSERT(flags & PGO_SYNCIO);
 	if (swslot == SWSLOT_BAD) {
 		return EIO;

Reply via email to