Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Omit needless volatile qualifiers.



details:   https://anonhg.NetBSD.org/src/rev/f56e5b9aed0f
branches:  trunk
changeset: 822429:f56e5b9aed0f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Mar 20 01:06:29 2017 +0000

description:
Omit needless volatile qualifiers.

All these variables are used exclusively with alldevs_mtx held, not
atomics.  No need for volatile voodoo here.

diffstat:

 sys/kern/subr_autoconf.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 4a67a8c40ac1 -r f56e5b9aed0f sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Mon Mar 20 01:05:03 2017 +0000
+++ b/sys/kern/subr_autoconf.c  Mon Mar 20 01:06:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.249 2017/03/20 01:05:03 riastradh Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.250 2017/03/20 01:06:29 riastradh Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.249 2017/03/20 01:05:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.250 2017/03/20 01:06:29 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -219,10 +219,10 @@
 /* list of all devices */
 static struct devicelist alldevs = TAILQ_HEAD_INITIALIZER(alldevs);
 static kmutex_t alldevs_mtx;
-static volatile bool alldevs_garbage = false;
-static volatile devgen_t alldevs_gen = 1;
-static volatile int alldevs_nread = 0;
-static volatile int alldevs_nwrite = 0;
+static bool alldevs_garbage = false;
+static devgen_t alldevs_gen = 1;
+static int alldevs_nread = 0;
+static int alldevs_nwrite = 0;
 
 static int config_pending;             /* semaphore for mountroot */
 static kmutex_t config_misc_lock;



Home | Main Index | Thread Index | Old Index