diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-04-12 06:35:26 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-04-12 06:35:26 +0000 |
| commit | 4bf7fa303c334921e14ce3198f30b0b7bb4944bd (patch) | |
| tree | e08cb334fc8002d06f45af21b2014dfefa32dff7 | |
| parent | 193514c588df3c22fe2ac76d1bdf832a5fc4aac5 (diff) | |
ttycheckoutq(9): wait=0 always, parameter no longer useful, nix it.
XXX kernel revbump
| -rw-r--r-- | sys/kern/subr_prf.c | 6 | ||||
| -rw-r--r-- | sys/kern/tty.c | 14 | ||||
| -rw-r--r-- | sys/sys/tty.h | 4 |
3 files changed, 11 insertions, 13 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 83e92d7d7bb..ad65c64ee1a 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -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; } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 262ed5c2536..c92de98ce3d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -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, int flag) * 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 wait) } 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 */ diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 3bcadea2c77..60386960e82 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -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); |
