Parity on 4.x BSD UNIX ports

Guy Harris guy at gorodish.Sun.COM
Fri Apr 15 15:43:56 AEST 1988


> >>... Berkeley CSRG are working on a POSIX-like tty interface [me]
> 
> >I presume it's POSIX-compatible, not just "POSIX-like". [guy]
> 
> I said `POSIX-like' because, strictly speaking, POSIX does not exist
> yet.

True.  Unfortunately, "POSIX-like" may connote "we've lifted some ideas from
POSIX, but we have no committment to make it particularly look like POSIX"
rather than "we'll try our best to make it look like POSIX"; I believe the
latter is what was intended.  (The same problem exists with "UNIX-like", a term
that is much overused, especially when used to refer to systems derived from
AT&T code....)

> >Actually, we'll provide it with SunOS 4.0. ...
> >Basically, output is never stripped to 7 bits by the software; the only such
> >stripping is done by the hardware if you set the character width to 7 bits.
> 
> There is some confusion here when you get to simplistic hardware that
> does not do parity at all.  In that case I would assume the software
> will emulate the nonexistent hardware stripping.  (Actually, if you set
> the `device' to 7 bits, no parity, the driver is obliged to fake up a
> parity bit [1 or 0, I forget] to emulate a stop bit, given the lack of
> anything better, on such hardware.  Fortunately, we have no such
> hardware around here ...

Are you certain?  The 4.3BSD VAX "vax/cons.c" console driver does use "partab"
when transmitting to the console.  "partab" dates back to the aforementioned
flavor of hardware, namely various DL-11 flavors on PDP-11 UNIX.

Actually, what I should have said is "output is never stripped to 7 bits by the
line discipline; the only such stripping is done by the hardware or the
low-level device driver if you set the character width to 7 bits."  If you have
hardware that doesn't do parity generation or checking, the driver would do the
former (and perhaps the latter, if anybody cares) and present to the line
discipline the appearance of a device that does it.  ("line discipline" refers,
in systems such as SunOS 4.0 that use streams for the tty subsystem, to the
streams module that performs the functions of a line discipline in systems that
don't use streams for the tty subsystem.)



More information about the Comp.unix.wizards mailing list