Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus spif(4): Convert to ttylock/ttyunlock.
details: https://anonhg.NetBSD.org/src/rev/6b8c04060c11
branches: trunk
changeset: 372095:6b8c04060c11
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Oct 26 23:46:50 2022 +0000
description:
spif(4): Convert to ttylock/ttyunlock.
diffstat:
sys/dev/sbus/spif.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r accd6a7e4b5a -r 6b8c04060c11 sys/dev/sbus/spif.c
--- a/sys/dev/sbus/spif.c Wed Oct 26 23:46:37 2022 +0000
+++ b/sys/dev/sbus/spif.c Wed Oct 26 23:46:50 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spif.c,v 1.34 2021/08/07 16:19:15 thorpej Exp $ */
+/* $NetBSD: spif.c,v 1.35 2022/10/26 23:46:50 riastradh Exp $ */
/* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */
/*
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.34 2021/08/07 16:19:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.35 2022/10/26 23:46:50 riastradh Exp $");
#include "spif.h"
#if NSPIF > 0
@@ -354,7 +354,7 @@
if (kauth_authorize_device_tty(l->l_cred, KAUTH_DEVICE_TTY_OPEN, tp))
return (EBUSY);
- mutex_spin_enter(&tty_lock);
+ ttylock(tp);
if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
ttychars(tp);
tp->t_iflag = TTYDEF_IFLAG;
@@ -393,12 +393,12 @@
int error;
error = ttysleep(tp, &tp->t_rawcv, true, 0);
if (error != 0) {
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
return (error);
}
}
}
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
return ((*tp->t_linesw->l_open)(dev, tp));
}
Home |
Main Index |
Thread Index |
Old Index