RTEMS socket programming (select usage etc.)
Eric Norum
norume at aps.anl.gov
Thu Nov 13 15:45:27 UTC 2003
Jonas Moberg wrote:
>>In 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. "
>
> Would this state that one can use only one task for reading and writing
> or one task that reads and
> another task that writes?
> If we don't want to do a traditional server that reads, processes data
> and then writes to a socket
> by one thread what, is then the recommended way?
> We would like to asyncronously read and write from several tasks.
> The rtems select implementation says that usage should be avoided if
> possible.
>
Sorry for the cryptic documentation.
Yes, it is quite acceptable to have one task reading and another task writing a single socket. What is not acceptable is to have two or more tasks trying to read a single socket at the same time. It is also unacceptable to have two or more tasks trying to write a single socket at the same time.
--
Eric Norum norume at aps.anl.gov
Advanced Photon Source Phone: (630) 252-4793
Argonne National Laboratory
More information about the users
mailing list