Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb uhso(4): Convert locking comments to locking ass...
details: https://anonhg.NetBSD.org/src/rev/b13788f6bc36
branches: trunk
changeset: 372099:b13788f6bc36
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Oct 26 23:53:03 2022 +0000
description:
uhso(4): Convert locking comments to locking assertions.
diffstat:
sys/dev/usb/uhso.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r 21cdf33a2e47 -r b13788f6bc36 sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c Wed Oct 26 23:50:28 2022 +0000
+++ b/sys/dev/usb/uhso.c Wed Oct 26 23:53:03 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $ */
+/* $NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1759,7 +1759,6 @@
return error;
}
-/* this is called with tty_lock held */
static void
uhso_tty_stop(struct tty *tp, int flag)
{
@@ -1768,6 +1767,8 @@
UHSOUNIT(tp->t_dev));
struct uhso_port *hp = sc->sc_port[UHSOPORT(tp->t_dev)];
#endif
+
+ KASSERT(ttylocked(tp));
}
static struct tty *
@@ -1838,7 +1839,6 @@
return 0;
}
-/* this is called with tty_lock held */
Static void
uhso_tty_start(struct tty *tp)
{
@@ -1847,6 +1847,8 @@
struct uhso_port *hp = sc->sc_port[UHSOPORT(tp->t_dev)];
int s;
+ KASSERT(ttylocked(tp));
+
if (!device_is_active(sc->sc_dev))
return;
Home |
Main Index |
Thread Index |
Old Index