[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding select() to termios file descriptors



After a little more time to think on this, I've got a few ideas I'd like
to present.

1) There should be no changes made until after 4.1.0 is released.
2) The entire serial I/O mechanism should be torn apart and rewritten to
more closely match the networking I/O system.  For example, the existing
termios code has too many places where interrupts are disabled for too
long and has too much code run in the context of the receive and
transmit interrupt handlers.  Converting to a system similar to the
network stack (one task for receive, one for transmit, protection via
semaphores instead of interrupt disable, etc.) will fix these problems.
3) The new serial I/O mechanism should fit in with the networking code
so that a select() can wait for serial and/or socket descriptors to
become ready.
4) The new serial I/O mechanism should allow for multiple line
disciplines to allow for efficient implementation of things like PPP and
for supporting things like commandeering console I/O to a telnet
connection for remote console operation (c.f. VxWorks).  The whole
package begins to sound a lot more like STREAMS.....
5) An application which calls select() but makes no other use of the
networking code should not pull in all the rest of the network code.

Also, the sp and tm tests should be rewritten so they run even when
interrupt-driven output is used since interrupt-driven output will be
then norm once item (2) above is implemented.

Comments?
Anyone out there feel like taking on this project?
-- 
Eric Norum                                 eric at cls.usask.ca
Canadian Light Source                      Phone: (306) 966-6308
University of Saskatchewan                 FAX:   (306) 966-6058
Saskatoon, Canada.