From owner-cvs-sys Sun Jul 30 05:39:50 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id FAA05973 for cvs-sys-outgoing; Sun, 30 Jul 1995 05:39:50 -0700 Received: (from bde@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id FAA05963 ; Sun, 30 Jul 1995 05:39:44 -0700 Date: Sun, 30 Jul 1995 05:39:44 -0700 From: Bruce Evans Message-Id: <199507301239.FAA05963@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/sys tty.h Sender: cvs-sys-owner@freebsd.org Precedence: bulk bde 95/07/30 05:39:43 Modified: sys/kern tty.c sys/sys tty.h Log: Split TS_ASLEEP (sleep on output [below low water])into TS_SO_OLOWAT (sleep on output below low water) and TS_SO_OCOMPLETE (sleep on output complete). Most of the support for this has already been committed. Drivers should call ttwwakeup() to handle wakeups whenever output is below low water (and some output event causes this condition to be checked) or TS_BUSY is cleared. tty.c: Fix the livelock in ttywait() properly by sleeping on output complete, not on output below low water. Use ttwwakeup() instead of separate select and output wakeups for all wakeups of writers. Add wakeups of writers for output flushes and carrier/clocal transitions. Don't go to sleep in ttycheckoutq() if ttstart() reduces the queue to below low water. Use the timeout built into tsleep() in ttycheckoutq(). Optimize the select wakeup in ttwwakeup(). It seems reasonable to know too much about the internals of tp->t_wsel now that the knowledge is localised in tty.c.