WOPEN|ISOPEN, etc.

P. T. Withington ptw at vaxine.UUCP
Sat May 5 04:08:47 AEST 1984


I am working on a tty driver for a Un*x port that will deal with modem signals
and am looking for some enlightenment on the original intent of the various
"state" flags.  I cannot discern any clear-cut philosophy from the drivers that
I know of.

Particular questions include:

Is WOPEN set while you sleep for a carrier?  Presumably you should clear it
when you wake up.  Several drivers I have seen set it and forget it.  Other
drivers seem to assume that WOPEN == !ISOPEN.

Should ISOPEN only be set *after* the carrier comes on?  Most drivers I know
of punt this issue by ignoring carrier.

It appears you should use WOPEN to decide whether to turn off the device in
close, so you don't get unwanted interrupts.  Most drivers punt this issue by
leaving interrupts on all the time and throwing away characters that arrive
for unopened devices.

Is there a conventional place to sleep when waiting for carrier?  I have seen
rawq, outq and tp all used.

Does anybody use BUSY for anything?  How about ASLEEP?  Most of the places I
can find where they could be used, the designer played it safe and called
ttstart/wakeup anyways.

(I hesitate to ask, but) Is there anything more than "The UNIX I/O System"
written down anywhere?

                                o.o     --ptw
                                 ~



More information about the Comp.unix.wizards mailing list