diff options
| author | 2010-07-02 17:27:01 +0000 | |
|---|---|---|
| committer | 2010-07-02 17:27:01 +0000 | |
| commit | 4cc8800e3a0bcd323fb689c6f886d94920b8a5a8 (patch) | |
| tree | 6a3b4d2c1d22794983427d18fd4eb5ef03b9c9e2 /sys/kern/tty_pty.c | |
| parent | Constipate init_hash() to eliminate a warning and remove a cast that is (diff) | |
| download | wireguard-openbsd-4cc8800e3a0bcd323fb689c6f886d94920b8a5a8.tar.xz wireguard-openbsd-4cc8800e3a0bcd323fb689c6f886d94920b8a5a8.zip | |
Move common code for waking up writers on a tty into a function.
ok deraadt matthew millert
Diffstat (limited to 'sys/kern/tty_pty.c')
| -rw-r--r-- | sys/kern/tty_pty.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 16e63e2a12e..9e4d0135cd7 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.46 2010/06/28 14:13:36 deraadt Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.47 2010/07/02 17:27:01 nicm Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -502,13 +502,7 @@ ptcread(dev_t dev, struct uio *uio, int flag) break; error = uiomove(buf, cc, uio); } - if (tp->t_outq.c_cc <= tp->t_lowat) { - if (tp->t_state&TS_ASLEEP) { - tp->t_state &= ~TS_ASLEEP; - wakeup(&tp->t_outq); - } - selwakeup(&tp->t_wsel); - } + ttwakeupwr(tp); if (bufcc) bzero(buf, bufcc); return (error); |
