summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/armv7/exynos/exuart.c6
-rw-r--r--sys/arch/sparc64/dev/sab.c4
-rw-r--r--sys/dev/fdt/imxuart.c6
-rw-r--r--sys/dev/fdt/mvuart.c6
-rw-r--r--sys/dev/ic/com.c6
-rw-r--r--sys/dev/ic/cy.c4
-rw-r--r--sys/dev/ic/pluart.c6
-rw-r--r--sys/dev/ic/z8530tty.c4
-rw-r--r--sys/dev/sbus/magma.c4
-rw-r--r--sys/dev/sbus/spif.c4
-rw-r--r--sys/dev/usb/ucom.c4
-rw-r--r--sys/kern/tty.c22
-rw-r--r--sys/kern/tty_pty.c10
-rw-r--r--sys/net/ppp_tty.c4
-rw-r--r--sys/sys/tty.h5
15 files changed, 46 insertions, 49 deletions
diff --git a/sys/arch/armv7/exynos/exuart.c b/sys/arch/armv7/exynos/exuart.c
index 4b0588750ea..d8d2f125d9e 100644
--- a/sys/arch/armv7/exynos/exuart.c
+++ b/sys/arch/armv7/exynos/exuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exuart.c,v 1.15 2018/05/31 10:30:10 kettenis Exp $ */
+/* $OpenBSD: exuart.c,v 1.16 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -359,7 +359,7 @@ exuart_param(struct tty *tp, struct termios *t)
while (ISSET(tp->t_state, TS_BUSY)) {
++sc->sc_halt;
error = ttysleep(tp, &tp->t_outq,
- TTOPRI | PCATCH, "exuartprm", 0);
+ TTOPRI | PCATCH, "exuartprm");
--sc->sc_halt;
if (error) {
exuart_start(tp);
@@ -667,7 +667,7 @@ exuartopen(dev_t dev, int flag, int mode, struct proc *p)
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq,
- TTIPRI | PCATCH, ttopen, 0);
+ TTIPRI | PCATCH, ttopen);
/*
* If TS_WOPEN has been reset, that means the
* cua device has been closed. We don't want
diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c
index d518f2c28ef..f7af0bf6d98 100644
--- a/sys/arch/sparc64/dev/sab.c
+++ b/sys/arch/sparc64/dev/sab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sab.c,v 1.35 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: sab.c,v 1.36 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -732,7 +732,7 @@ sabttyopen(dev, flags, mode, p)
tp->t_state |= TS_WOPEN;
error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
- "sabttycd", 0);
+ "sabttycd");
if (error != 0) {
splx(s);
tp->t_state &= ~TS_WOPEN;
diff --git a/sys/dev/fdt/imxuart.c b/sys/dev/fdt/imxuart.c
index 1418c90af09..e2604bf5025 100644
--- a/sys/dev/fdt/imxuart.c
+++ b/sys/dev/fdt/imxuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuart.c,v 1.7 2019/06/15 14:15:12 kettenis Exp $ */
+/* $OpenBSD: imxuart.c,v 1.8 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -301,7 +301,7 @@ imxuart_param(struct tty *tp, struct termios *t)
while (ISSET(tp->t_state, TS_BUSY)) {
++sc->sc_halt;
error = ttysleep(tp, &tp->t_outq,
- TTOPRI | PCATCH, "imxuartprm", 0);
+ TTOPRI | PCATCH, "imxuartprm");
--sc->sc_halt;
if (error) {
imxuart_start(tp);
@@ -598,7 +598,7 @@ imxuartopen(dev_t dev, int flag, int mode, struct proc *p)
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq,
- TTIPRI | PCATCH, ttopen, 0);
+ TTIPRI | PCATCH, ttopen);
/*
* If TS_WOPEN has been reset, that means the
* cua device has been closed. We don't want
diff --git a/sys/dev/fdt/mvuart.c b/sys/dev/fdt/mvuart.c
index 0ce1afb78a1..3d0229a396a 100644
--- a/sys/dev/fdt/mvuart.c
+++ b/sys/dev/fdt/mvuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mvuart.c,v 1.1 2019/04/30 20:04:31 patrick Exp $ */
+/* $OpenBSD: mvuart.c,v 1.2 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
* Copyright (c) 2018 Patrick Wildt <patrick@blueri.se>
@@ -280,7 +280,7 @@ mvuart_param(struct tty *tp, struct termios *t)
while (ISSET(tp->t_state, TS_BUSY)) {
++sc->sc_halt;
error = ttysleep(tp, &tp->t_outq,
- TTOPRI | PCATCH, "mvuartprm", 0);
+ TTOPRI | PCATCH, "mvuartprm");
--sc->sc_halt;
if (error) {
mvuart_start(tp);
@@ -450,7 +450,7 @@ mvuartopen(dev_t dev, int flag, int mode, struct proc *p)
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq,
- TTIPRI | PCATCH, ttopen, 0);
+ TTIPRI | PCATCH, ttopen);
/*
* If TS_WOPEN has been reset, that means the
* cua device has been closed. We don't want
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index df5aff315d8..a83c8f70976 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.169 2018/05/14 19:25:54 kettenis Exp $ */
+/* $OpenBSD: com.c,v 1.170 2019/07/19 00:17:15 cheloha Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -395,7 +395,7 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
(!ISSET(tp->t_cflag, CLOCAL) &&
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
- error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
+ error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, ttopen);
/*
* If TS_WOPEN has been reset, that means the cua device
* has been closed. We don't want to fail in that case,
@@ -821,7 +821,7 @@ comparam(struct tty *tp, struct termios *t)
++sc->sc_halt;
error = ttysleep(tp, &tp->t_outq,
- TTOPRI | PCATCH, "comprm", 0);
+ TTOPRI | PCATCH, "comprm");
--sc->sc_halt;
if (error) {
comstart(tp);
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c
index 515fc23aaed..4ca50c214ba 100644
--- a/sys/dev/ic/cy.c
+++ b/sys/dev/ic/cy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cy.c,v 1.38 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: cy.c,v 1.39 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 1996 Timo Rossi.
* All rights reserved.
@@ -372,7 +372,7 @@ cyopen(dev, flag, mode, p)
!ISSET(tp->t_state, TS_CARR_ON)) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
- "cydcd", 0);
+ "cydcd");
if (error != 0) {
splx(s);
CLR(tp->t_state, TS_WOPEN);
diff --git a/sys/dev/ic/pluart.c b/sys/dev/ic/pluart.c
index 0f024c0ad34..d21f386374e 100644
--- a/sys/dev/ic/pluart.c
+++ b/sys/dev/ic/pluart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pluart.c,v 1.2 2018/08/12 18:32:18 kettenis Exp $ */
+/* $OpenBSD: pluart.c,v 1.3 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2005 Dale Rahn <drahn@dalerahn.com>
@@ -287,7 +287,7 @@ pluart_param(struct tty *tp, struct termios *t)
while (ISSET(tp->t_state, TS_BUSY)) {
++sc->sc_halt;
error = ttysleep(tp, &tp->t_outq,
- TTOPRI | PCATCH, "pluartprm", 0);
+ TTOPRI | PCATCH, "pluartprm");
--sc->sc_halt;
if (error) {
pluart_start(tp);
@@ -576,7 +576,7 @@ pluartopen(dev_t dev, int flag, int mode, struct proc *p)
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq,
- TTIPRI | PCATCH, ttopen, 0);
+ TTIPRI | PCATCH, ttopen);
/*
* If TS_WOPEN has been reset, that means the
* cua device has been closed. We don't want
diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c
index 10fa788a885..5737c6ee076 100644
--- a/sys/dev/ic/z8530tty.c
+++ b/sys/dev/ic/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.30 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.31 2019/07/19 00:17:15 cheloha Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -630,7 +630,7 @@ zsopen(dev_t dev, int flags, int mode, struct proc *p)
break;
error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH,
- ttopen, 0);
+ ttopen);
if (!ZSDIALOUT(dev) && cs->cs_cua && error == EINTR) {
error = 0;
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c
index 0ecd08fef15..e6c11252067 100644
--- a/sys/dev/sbus/magma.c
+++ b/sys/dev/sbus/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.28 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: magma.c,v 1.29 2019/07/19 00:17:15 cheloha Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@@ -904,7 +904,7 @@ mttyopen(dev_t dev, int flags, int mode, struct proc *p)
int error;
SET(tp->t_state, TS_WOPEN);
- error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, "mttydcd", 0);
+ error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, "mttydcd");
if (error != 0) {
splx(s);
CLR(tp->t_state, TS_WOPEN);
diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c
index b6dd4317a27..19f128420d7 100644
--- a/sys/dev/sbus/spif.c
+++ b/sys/dev/sbus/spif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spif.c,v 1.22 2018/12/27 11:09:17 claudio Exp $ */
+/* $OpenBSD: spif.c,v 1.23 2019/07/19 00:17:15 cheloha Exp $ */
/*
* Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net)
@@ -391,7 +391,7 @@ sttyopen(dev_t dev, int flags, int mode, struct proc *p)
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
- "sttycd", 0);
+ "sttycd");
if (error != 0) {
splx(s);
CLR(tp->t_state, TS_WOPEN);
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 4e6c9e87583..f3120e3d0d9 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucom.c,v 1.67 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: ucom.c,v 1.68 2019/07/19 00:17:15 cheloha Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
@@ -493,7 +493,7 @@ ucom_do_open(dev_t dev, int flag, int mode, struct proc *p)
!ISSET(tp->t_state, TS_CARR_ON))) {
SET(tp->t_state, TS_WOPEN);
error = ttysleep(tp, &tp->t_rawq,
- TTIPRI | PCATCH, ttopen, 0);
+ TTIPRI | PCATCH, ttopen);
if (usbd_is_dying(sc->sc_uparent)) {
splx(s);
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 3f892fe8df8..a21f7f2741f 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.147 2019/07/09 18:59:15 kn Exp $ */
+/* $OpenBSD: tty.c,v 1.148 2019/07/19 00:17:15 cheloha Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -742,7 +742,7 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
return (EIO);
pgsignal(pr->ps_pgrp, SIGTTOU, 1);
error = ttysleep(tp, &lbolt, TTOPRI | PCATCH,
- ttybg, 0);
+ ttybg);
if (error)
return (error);
}
@@ -1220,7 +1220,7 @@ ttywait(struct tty *tp)
(ISSET(tp->t_state, TS_CARR_ON) || ISSET(tp->t_cflag, CLOCAL))
&& tp->t_oproc) {
SET(tp->t_state, TS_ASLEEP);
- error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
+ error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout);
if (error)
break;
} else
@@ -1489,7 +1489,7 @@ loop: lflag = tp->t_lflag;
goto out;
}
pgsignal(pr->ps_pgrp, SIGTTIN, 1);
- error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0);
+ error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg);
if (error)
goto out;
goto loop;
@@ -1559,7 +1559,7 @@ sleep:
goto out;
}
error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
- carrier ? ttyin : ttopen, 0);
+ carrier ? ttyin : ttopen);
splx(s);
if (stime && timeout_triggered(stime))
error = EWOULDBLOCK;
@@ -1588,7 +1588,7 @@ read:
pgsignal(tp->t_pgrp, SIGTSTP, 1);
if (first) {
error = ttysleep(tp, &lbolt, TTIPRI | PCATCH,
- ttybg, 0);
+ ttybg);
if (error)
break;
goto loop;
@@ -1717,7 +1717,7 @@ loop:
} else {
/* Sleep awaiting carrier. */
error = ttysleep(tp,
- &tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
+ &tp->t_rawq, TTIPRI | PCATCH, ttopen);
splx(s);
if (error)
goto out;
@@ -1739,7 +1739,7 @@ loop:
goto out;
}
pgsignal(pr->ps_pgrp, SIGTTOU, 1);
- error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0);
+ error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg);
if (error)
goto out;
goto loop;
@@ -1871,7 +1871,7 @@ ovhiwat:
return (uio->uio_resid == cnt ? EWOULDBLOCK : 0);
}
SET(tp->t_state, TS_ASLEEP);
- error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
+ error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout);
splx(s);
if (error)
goto out;
@@ -2279,13 +2279,13 @@ tputchar(int c, struct tty *tp)
* at the start of the call.
*/
int
-ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo)
+ttysleep(struct tty *tp, void *chan, int pri, char *wmesg)
{
int error;
short gen;
gen = tp->t_gen;
- if ((error = tsleep(chan, pri, wmesg, timo)) != 0)
+ if ((error = tsleep_nsec(chan, pri, wmesg, INFSLP)) != 0)
return (error);
return (tp->t_gen == gen ? 0 : ERESTART);
}
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index f09fb28df82..6c0ba70d018 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.93 2019/03/11 17:13:31 anton Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.94 2019/07/19 00:17:16 cheloha Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -255,8 +255,7 @@ ptsopen(dev_t dev, int flag, int devtype, struct proc *p)
tp->t_state |= TS_WOPEN;
if (flag & FNONBLOCK)
break;
- error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
- ttopen, 0);
+ error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, ttopen);
if (error)
return (error);
}
@@ -296,8 +295,7 @@ again:
pr->ps_flags & PS_PPWAIT)
return (EIO);
pgsignal(pr->ps_pgrp, SIGTTIN, 1);
- error = ttysleep(tp, &lbolt,
- TTIPRI | PCATCH, ttybg, 0);
+ error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg);
if (error)
return (error);
}
@@ -305,7 +303,7 @@ again:
if (flag & IO_NDELAY)
return (EWOULDBLOCK);
error = ttysleep(tp, &tp->t_canq,
- TTIPRI | PCATCH, ttyin, 0);
+ TTIPRI | PCATCH, ttyin);
if (error)
return (error);
goto again;
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 2bd7d37d68e..d3c337c0e09 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppp_tty.c,v 1.51 2018/11/09 14:14:31 claudio Exp $ */
+/* $OpenBSD: ppp_tty.c,v 1.52 2019/07/19 00:17:16 cheloha Exp $ */
/* $NetBSD: ppp_tty.c,v 1.12 1997/03/24 21:23:10 christos Exp $ */
/*
@@ -308,7 +308,7 @@ pppread(struct tty *tp, struct uio *uio, int flag)
splx(s);
return (EWOULDBLOCK);
}
- error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI|PCATCH, ttyin, 0);
+ error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI|PCATCH, ttyin);
if (error) {
splx(s);
return error;
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index c562e02d8ad..efe0bfb24aa 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.37 2016/05/24 16:09:07 deraadt Exp $ */
+/* $OpenBSD: tty.h,v 1.38 2019/07/19 00:17:16 cheloha Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -292,8 +292,7 @@ int ttyoutput(int c, struct tty *tp);
void ttypend(struct tty *tp);
void ttyretype(struct tty *tp);
void ttyrub(int c, struct tty *tp);
-int ttysleep(struct tty *tp,
- void *chan, int pri, char *wmesg, int timeout);
+int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg);
int ttywait(struct tty *tp);
int ttywflush(struct tty *tp);
void ttytstamp(struct tty *tp, int octs, int ncts, int odcd, int ndcd);