Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic zs(4): Convert to ttylock/ttyunlock.
details: https://anonhg.NetBSD.org/src/rev/22a3f1bbf718
branches: trunk
changeset: 372091:22a3f1bbf718
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Oct 26 23:45:25 2022 +0000
description:
zs(4): Convert to ttylock/ttyunlock.
diffstat:
sys/dev/ic/z8530tty.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (57 lines):
diff -r 2239d1730b66 -r 22a3f1bbf718 sys/dev/ic/z8530tty.c
--- a/sys/dev/ic/z8530tty.c Wed Oct 26 23:45:10 2022 +0000
+++ b/sys/dev/ic/z8530tty.c Wed Oct 26 23:45:25 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: z8530tty.c,v 1.134 2019/11/10 21:16:35 chs Exp $ */
+/* $NetBSD: z8530tty.c,v 1.135 2022/10/26 23:45:25 riastradh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -137,7 +137,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.134 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.135 2022/10/26 23:45:25 riastradh Exp $");
#include "opt_kgdb.h"
#include "opt_ntp.h"
@@ -565,7 +565,7 @@
if (kauth_authorize_device_tty(l->l_cred, KAUTH_DEVICE_TTY_OPEN, tp))
return (EBUSY);
- mutex_spin_enter(&tty_lock);
+ ttylock(tp);
/*
* Do the following iff this is a first open.
@@ -578,7 +578,7 @@
/* Call the power management hook. */
if (cs->enable) {
if ((*cs->enable)(cs)) {
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
printf("%s: device enable failed\n",
device_xname(zst->zst_dev));
return (EIO);
@@ -624,9 +624,9 @@
/* Make sure zsparam will see changes. */
tp->t_ospeed = 0;
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
(void) zsparam(tp, &t);
- mutex_spin_enter(&tty_lock);
+ ttylock(tp);
/*
* Note: zsparam has done: cflag, ispeed, ospeed
@@ -666,7 +666,7 @@
mutex_spin_exit(&cs->cs_lock);
}
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
error = ttyopen(tp, ZSDIALOUT(dev), ISSET(flags, O_NONBLOCK));
if (error)
Home |
Main Index |
Thread Index |
Old Index