Module Name:    src
Committed By:   riastradh
Date:           Wed Oct 26 23:44:36 UTC 2022

Modified Files:
        src/sys/dev/dec: dz.c

Log Message:
vax/dz(4): Convert to ttylock/ttyunlock.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/dec/dz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/dec/dz.c
diff -u src/sys/dev/dec/dz.c:1.42 src/sys/dev/dec/dz.c:1.43
--- src/sys/dev/dec/dz.c:1.42	Fri Jul 25 08:10:36 2014
+++ src/sys/dev/dec/dz.c	Wed Oct 26 23:44:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: dz.c,v 1.42 2014/07/25 08:10:36 dholland Exp $	*/
+/*	$NetBSD: dz.c,v 1.43 2022/10/26 23:44:36 riastradh Exp $	*/
 /*
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.42 2014/07/25 08:10:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.43 2022/10/26 23:44:36 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -407,7 +407,7 @@ dzopen(dev_t dev, int flag, int mode, st
 	/* Use DMBIS and *not* DMSET or else we clobber incoming bits */
 	if (dzmctl(sc, line, DML_DTR, DMBIS) & DML_DCD)
 		tp->t_state |= TS_CARR_ON;
-	mutex_spin_enter(&tty_lock);
+	ttylock(tp);
 	while (!(flag & O_NONBLOCK) && !(tp->t_cflag & CLOCAL) &&
 	       !(tp->t_state & TS_CARR_ON)) {
 		tp->t_wopen++;
@@ -416,7 +416,7 @@ dzopen(dev_t dev, int flag, int mode, st
 		if (error)
 			break;
 	}
-	mutex_spin_exit(&tty_lock);
+	ttyunlock(tp);
 	if (error)
 		return (error);
 	return ((*tp->t_linesw->l_open)(dev, tp));

Reply via email to