Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/dev sgimips/scn(4): Convert to ttylock/ttyu...



details:   https://anonhg.NetBSD.org/src/rev/5d4e854ef273
branches:  trunk
changeset: 372102:5d4e854ef273
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Oct 26 23:59:14 2022 +0000

description:
sgimips/scn(4): Convert to ttylock/ttyunlock.

diffstat:

 sys/arch/sgimips/dev/scn.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9cf3f1c34bf8 -r 5d4e854ef273 sys/arch/sgimips/dev/scn.c
--- a/sys/arch/sgimips/dev/scn.c        Wed Oct 26 23:55:40 2022 +0000
+++ b/sys/arch/sgimips/dev/scn.c        Wed Oct 26 23:59:14 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scn.c,v 1.9 2022/10/04 07:24:32 rin Exp $ */
+/*     $NetBSD: scn.c,v 1.10 2022/10/26 23:59:14 riastradh Exp $ */
 
 /*
  * Resurrected from the old pc532 port 1/18/2009.
@@ -92,7 +92,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.9 2022/10/04 07:24:32 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.10 2022/10/26 23:59:14 riastradh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1098,7 +1098,7 @@
        if (kauth_authorize_device_tty(l->l_cred, KAUTH_DEVICE_TTY_OPEN, tp))
                return (EBUSY);
 
-       mutex_spin_enter(&tty_lock);
+       ttylock(tp);
 
        if ((tp->t_state & TS_ISOPEN) == 0 && tp->t_wopen == 0) {
                ttychars(tp);
@@ -1135,7 +1135,7 @@
                        tp->t_state &= ~TS_CARR_ON;
        }
 
-       mutex_spin_exit(&tty_lock);
+       ttyunlock(tp);
 
        error = ttyopen(tp, SCN_DIALOUT(sc), flags & O_NONBLOCK);
 if (error) printf("ttyopen failed line %d, error %d\n", __LINE__, error);



Home | Main Index | Thread Index | Old Index