Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/bluetooth bth5(4): Convert to ttylock/ttyunlock.



details:   https://anonhg.NetBSD.org/src/rev/bdec562f45f6
branches:  trunk
changeset: 372087:bdec562f45f6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Oct 26 23:43:34 2022 +0000

description:
bth5(4): Convert to ttylock/ttyunlock.

diffstat:

 sys/dev/bluetooth/bth5.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 5427b1973b98 -r bdec562f45f6 sys/dev/bluetooth/bth5.c
--- a/sys/dev/bluetooth/bth5.c  Wed Oct 26 23:43:21 2022 +0000
+++ b/sys/dev/bluetooth/bth5.c  Wed Oct 26 23:43:34 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $  */
+/*     $NetBSD: bth5.c,v 1.8 2022/10/26 23:43:34 riastradh Exp $       */
 /*
  * Copyright (c) 2017 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.8 2022/10/26 23:43:34 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -411,11 +411,11 @@
        }
        sc = device_private(dev);
 
-       mutex_spin_enter(&tty_lock);
+       ttylock(tp);
        tp->t_sc = sc;
        sc->sc_tp = tp;
        ttyflush(tp, FREAD | FWRITE);
-       mutex_spin_exit(&tty_lock);
+       ttyunlock(tp);
 
        splx(s);
 
@@ -444,9 +444,9 @@
        MBUFQ_DRAIN(&sc->sc_dgq);
        bth5_sequencing_reset(sc);
 
-       mutex_spin_enter(&tty_lock);
+       ttylock(tp);
        ttyflush(tp, FREAD | FWRITE);
-       mutex_spin_exit(&tty_lock);     /* XXX */
+       ttyunlock(tp);  /* XXX */
        ttyldisc_release(tp->t_linesw);
        tp->t_linesw = ttyldisc_default();
        if (sc != NULL) {



Home | Main Index | Thread Index | Old Index