Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Change sc_dying from u_char to bool.
details: https://anonhg.NetBSD.org/src/rev/149ef4ee2706
branches: trunk
changeset: 354346:149ef4ee2706
user: nat <nat%NetBSD.org@localhost>
date: Tue Jun 13 00:54:37 2017 +0000
description:
Change sc_dying from u_char to bool.
diffstat:
sys/dev/wscons/wsbell.c | 13 +++++++------
sys/dev/wscons/wsbellvar.h | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diffs (80 lines):
diff -r 14ba952097b7 -r 149ef4ee2706 sys/dev/wscons/wsbell.c
--- a/sys/dev/wscons/wsbell.c Tue Jun 13 00:49:05 2017 +0000
+++ b/sys/dev/wscons/wsbell.c Tue Jun 13 00:54:37 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsbell.c,v 1.6 2017/06/13 00:49:05 nat Exp $ */
+/* $NetBSD: wsbell.c,v 1.7 2017/06/13 00:54:37 nat Exp $ */
/*-
* Copyright (c) 2017 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.6 2017/06/13 00:49:05 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.7 2017/06/13 00:54:37 nat Exp $");
#if defined(_KERNEL_OPT)
#include "wsmux.h"
@@ -220,6 +220,7 @@
sc->sc_base.me_dv = self;
sc->sc_accesscookie = ap->accesscookie;
+ sc->sc_dying = false;
sc->sc_spkr = device_unit(parent);
sc->sc_bell_data = wskbd_default_bell_data;
#if NWSMUX > 0
@@ -256,7 +257,7 @@
struct wsbell_softc *sc = device_private(self);
if (act == DVACT_DEACTIVATE)
- sc->sc_dying = 1;
+ sc->sc_dying = true;
return (0);
}
@@ -305,7 +306,7 @@
vdevgone(maj, mn, mn, VCHR);
mutex_enter(&sc->sc_bellock);
- sc->sc_dying = 1;
+ sc->sc_dying = true;
cv_broadcast(&sc->sc_bellcv);
mutex_exit(&sc->sc_bellock);
@@ -344,7 +345,7 @@
int flag, struct lwp *l)
{
struct wskbd_bell_data *ubdp, *kbdp;
- if (sc->sc_dying)
+ if (sc->sc_dying == true)
return (EIO);
/*
@@ -400,7 +401,7 @@
mutex_enter(&sc->sc_bellock);
cv_wait_sig(&sc->sc_bellcv, &sc->sc_bellock);
- if (sc->sc_dying) {
+ if (sc->sc_dying == true) {
mutex_exit(&sc->sc_bellock);
kthread_exit(0);
}
diff -r 14ba952097b7 -r 149ef4ee2706 sys/dev/wscons/wsbellvar.h
--- a/sys/dev/wscons/wsbellvar.h Tue Jun 13 00:49:05 2017 +0000
+++ b/sys/dev/wscons/wsbellvar.h Tue Jun 13 00:54:37 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsbellvar.h,v 1.2 2017/06/13 00:49:05 nat Exp $ */
+/* $NetBSD: wsbellvar.h,v 1.3 2017/06/13 00:54:37 nat Exp $ */
/*-
* Copyright (c) 2017 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
* All rights reserved.
@@ -45,7 +45,7 @@
void *sc_accesscookie;
int sc_refcnt;
- u_char sc_dying; /* device is being detached */
+ bool sc_dying; /* device is being detached */
lwp_t *sc_bellthread;
kmutex_t sc_bellock;
Home |
Main Index |
Thread Index |
Old Index