Dennis Windisch wrote:
>> Yes. The trick is to fill the rtskb cache with some buffers (module
>> parameter of rtnet.ko).
> Thanks for your help. 
> 
> But now I've encountered another problem, namely in setting the sockets to
> nonblocking mode (all this happens before rt_make_hard_real_time). 
> First I want to get the current flags of the socket:
>> int tmp = fcntl(m_socket, F_GETFL, 0);
> Then I want to add the "non-blocking" mode
>> int res = fcntl(m_socket, F_SETFL,tmp | O_NONBLOCK);
> 
> The error arises already in the first line. When I print out the value of
> tmp, I always getting a "-1" indicating an error. 

fcntl is not supported for RTDM devices, thus is also not available with
RTnet file descriptors (and it would have been called rt_dev_fcntl
anyway, just like rt_dev_ioctl, rt_dev_socket, etc.).

> 
> How are the commands to get/set flags for RT-sockets? I've searched in the
> documentation, but couldn't find them. I've just give it a try and used the
> "ioctl_rt" command instead of "fnctl", but this also returned a negative
> number (-95).  

We used to have a special IOCTL for the non-blocking mode, but that one
was dropped in favour of the unified timeout mechanism of recent RTDM:
use RTNET_RTIOC_TIMEOUT and pass an arbitrary negative timeout value.
Hmm, this is documented in stack/include/rtnet.h, and also in the
ChangeLog, but I see the need for an updated API overview - volunteers?
Review will be provided.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to