RTEMS socket programming (select usage etc.)

Sergei Organov osv at topconrd.ru
Thu Nov 13 15:06:12 UTC 2003


"Jonas Moberg" <jonas.moberg at solidsoftware.net> writes:
> >From the Network documentation I read the following information:
> 
> "The RTEMS network package provides almost a complete set of BSD network
> services. The network functions work like their BSD counterparts with
> the following exceptions:
> A given socket can be read or written by only one task at a time. "

In my application I read from one task and write from another and I didn't see
any problems doing this (the testing is rather thorough), so I think you can
do the same.

The only problem I've met is that using standard BSD sockets there is no way
to have blocking reads and non-blocking writes at the same time as O_NONBLOCK
flag is shared between reader and writer. One can set separate timeouts for
read and write operations, but timeout = 0 means "wait forever" and there is
no special timeout value meaning "don't wait". To solve the problem I've made
modifications to the BSD stack to support such a special timeout value.

-- 
Sergei.




More information about the users mailing list