RTEMS5 File Descriptors

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 21 07:00:04 UTC 2018

Hello Ian,

the file descriptors use now reference counting. In case you use a 
closed file descriptor you get an error. The file descriptor list order 
was changed to keep closed file descriptors as long as possible in the 
closed state to improve the detection of a use after close.

In case you plan to switch to libbsd for networking, then using kqueue() 
instead of select() is an option.

A quick and dirty hack would be to patch Newlib and set FD_SETSIZE to 
your desired value.

If you have all your software under control, then you can also define 
FD_SETSIZE yourself BEFORE you include <sys/select.h>.

You can also dynamically allocate the fd_set depending on 
rtems_libio_number_iops, for example:


I think we should mention this in the release notes.

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list