Module Name: src
Committed By: riastradh
Date: Wed Apr 12 06:35:26 UTC 2023
Modified Files:
src/sys/kern: subr_prf.c tty.c
src/sys/sys: tty.h
Log Message:
ttycheckoutq(9): wait=0 always, parameter no longer useful, nix it.
XXX kernel revbump
To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/sys/kern/subr_prf.c
cvs rdiff -u -r1.309 -r1.310 src/sys/kern/tty.c
cvs rdiff -u -r1.103 -r1.104 src/sys/sys/tty.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.199 src/sys/kern/subr_prf.c:1.200
--- src/sys/kern/subr_prf.c:1.199 Sun Apr 9 09:18:09 2023
+++ src/sys/kern/subr_prf.c Wed Apr 12 06:35:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.199 2023/04/09 09:18:09 riastradh Exp $ */
+/* $NetBSD: subr_prf.c,v 1.200 2023/04/12 06:35:26 riastradh Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.199 2023/04/09 09:18:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.200 2023/04/12 06:35:26 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -642,7 +642,7 @@ tprintf(tpr_t tpr, const char *fmt, ...)
va_list ap;
/* mutex_enter(&proc_lock); XXXSMP */
- if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp, 0)) {
+ if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp)) {
flags |= TOTTY;
tp = sess->s_ttyp;
}
Index: src/sys/kern/tty.c
diff -u src/sys/kern/tty.c:1.309 src/sys/kern/tty.c:1.310
--- src/sys/kern/tty.c:1.309 Tue Apr 11 10:23:47 2023
+++ src/sys/kern/tty.c Wed Apr 12 06:35:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.309 2023/04/11 10:23:47 riastradh Exp $ */
+/* $NetBSD: tty.c,v 1.310 2023/04/12 06:35:26 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.309 2023/04/11 10:23:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.310 2023/04/12 06:35:26 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2193,14 +2193,12 @@ ttread(struct tty *tp, struct uio *uio,
* Call with tty lock held.
*/
static int
-ttycheckoutq_wlock(struct tty *tp, int wait)
+ttycheckoutq_wlock(struct tty *tp)
{
int hiwat;
KASSERT(mutex_owned(&tty_lock));
- KASSERT(wait == 0);
-
hiwat = tp->t_hiwat;
if (tp->t_outq.c_cc > hiwat + 200)
if (tp->t_outq.c_cc > hiwat) {
@@ -2212,12 +2210,12 @@ ttycheckoutq_wlock(struct tty *tp, int w
}
int
-ttycheckoutq(struct tty *tp, int wait)
+ttycheckoutq(struct tty *tp)
{
int r;
mutex_spin_enter(&tty_lock);
- r = ttycheckoutq_wlock(tp, wait);
+ r = ttycheckoutq_wlock(tp);
mutex_spin_exit(&tty_lock);
return (r);
@@ -2801,7 +2799,7 @@ ttyputinfo(struct tty *tp, char *buf)
KASSERT(mutex_owned(&tty_lock));
- if (ttycheckoutq_wlock(tp, 0) == 0)
+ if (ttycheckoutq_wlock(tp) == 0)
return;
ttyprintf_nolock(tp, "%s\n", buf);
tp->t_rocount = 0; /* so pending input will be retyped if BS */
Index: src/sys/sys/tty.h
diff -u src/sys/sys/tty.h:1.103 src/sys/sys/tty.h:1.104
--- src/sys/sys/tty.h:1.103 Wed Oct 26 23:41:49 2022
+++ src/sys/sys/tty.h Wed Apr 12 06:35:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.h,v 1.103 2022/10/26 23:41:49 riastradh Exp $ */
+/* $NetBSD: tty.h,v 1.104 2023/04/12 06:35:26 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -285,7 +285,7 @@ int ttstart(struct tty *);
void ttwakeup(struct tty *);
int ttwrite(struct tty *, struct uio *, int);
void ttychars(struct tty *);
-int ttycheckoutq(struct tty *, int);
+int ttycheckoutq(struct tty *);
void ttycancel(struct tty *);
int ttyclose(struct tty *);
void ttyflush(struct tty *, int);