select() and serial drivers

Eric Norum eric at cls.usask.ca
Mon Jul 17 17:01:26 UTC 2000


Antti P Miettinen wrote:
> 
> Can the RTEMS select() be used to wait on file descriptors associated
> with TCP streams and serial ports (having termios compatible driver)?
> I'd like to have all fds in non blocking mode and have fds both in
> read and write masks.
> 

As of 4.5.0 select() works only with sockets.

\begin{soapbox}
If you're starting to write a new application, in many cases it's better
to use one thread per socket/tty instead of using select().  A call to
select() is quite expensive (and not only on RTEMS, but on vxWorks and
Linux, too).
\end{soapbox}

-- 
Eric Norum                                 eric at cls.usask.ca
Canadian Light Source                      Phone: (306) 966-6308
University of Saskatchewan                 FAX:   (306) 966-6058
Saskatoon, Canada.



More information about the users mailing list