freebsd-nq/sys
Bruce Evans 9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
..
alpha First incarnation of our Linux emulator or rather compatibility code. 1995-06-25 17:32:43 +00:00
amd64 Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL even 1995-07-30 17:49:24 +00:00
compat/linux First incarnation of our Linux emulator or rather compatibility code. 1995-06-25 17:32:43 +00:00
compile Stop cvs up -P from removing empty compile directories. 1994-08-25 16:20:16 +00:00
conf Add new ``SNAPDATE=""'' for use in snapshot building. 1995-07-29 18:42:29 +00:00
ddb Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
dev Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
fs Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
gnu Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
i386 Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
isa Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
isofs/cd9660 Change extern inline' to static inline' so that several functions 1995-07-25 21:50:50 +00:00
kern Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
libkern Rearrange the inner loop of scanc() to get better code on i*86's 1995-07-11 18:50:47 +00:00
miscfs Fix some incorrect comments that make reference to /dev/fd. 1995-07-31 09:52:21 +00:00
modules First incarnation of our Linux emulator or rather compatibility code. 1995-06-25 17:32:43 +00:00
msdosfs Fixed VOP_LINK argument order botch. 1995-06-28 07:06:55 +00:00
net Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
netccitt Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
netinet Try to make the `syn' blocking code act a bit more sensibly - don't 1995-07-31 13:58:35 +00:00
netiso Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
netns Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
nfs Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
nfsclient Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
nfsserver Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
pci Initialize "name" to quiet compiler. 1995-07-29 18:21:48 +00:00
powerpc/include Don't define CLK_TCK here. 1995-02-03 21:49:18 +00:00
rpc Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
scsi Change memcmp() to bcmp(). memcmp() isn't declared or implemented 1995-07-25 22:09:06 +00:00
sys Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
tools The generated VCALL always uses the first vp which in the case of /link/ 1995-07-07 13:41:28 +00:00
ufs Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
vm Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
Makefile Added ${MACHINE}/boot to build bootblocks. 1994-08-25 13:54:28 +00:00