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:

https://git.rtems.org/rtems-libbsd/commit/?id=4d8f9e62615d86a4f2d9b438da8276988277602f
https://git.rtems.org/rtems-libbsd/commit/?id=8ee0aa19cfc228a962d084bee805cb20bcd70f3b
https://git.rtems.org/rtems-libbsd/commit/?id=7ec4d8760dd98e647977fae76749609a81bdf6d2

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