Jan Kiszka wrote:
> Susan wrote:
>> Hi,Jan
>>    In rtnet-0.9.11:
>>                      rt_dev_getsockopt(fd, optname, optval, optlen)
>>                      rt_dev_setsockopt(fd, optname, optval, optlen)
> 
> That's really, really old legacy stuff, disabled unless you explicitly
> enable it by defining __RTNET_USE_LEGACY_API__ (I better remove this for
> the next release). Don't look at it, just use the standard RTDM API.
> 
>>    In rtai-3.7:
>>                      rt_dev_getsockopt(fd, level, optname, optval, optlen)
>>                      rt_dev_setsockopt(fd, level, optname, optval, optlen)
>>
>>    Why they lack the parameter 'level'?
>>
>>
>>    In rtai-3.7,there is the definition of 'rt_dev_select'.
>>    In rtnet-0.9.11,there is not 'select_rt' corresponding to 'rt_dev_select'.
>>    Why?
> 
> First of all rt_dev_* is RTDM business, RTnet only provides the required
> hooks to implement the backing services.
> 
> Regarding select: RTDM does not define such an API, it's the job of the
> real-time skins (in Xenomai speak, e.g. POSIX) to provide this service
> for all its file objects (not only RTDM-based ones). Don't know what the
> state of implementation on the RTAI side is.
>
>>    The type of last parameter 'timeout' in select() is 'struct timeval *', 
>> while
>> in   rt_dev_select() it is 'nanosecs_rel_t'. 
> 
> There is no such thing as rt_dev_select in RTDM. If RTAI should have
> defined that, I would suggest to ask RTAI what they did and why.
>

It does exist in RTAI, or in it's RTDM layer respectively. Funny enough I 
though 
this was defined in the API rev. 7, but I can't find it in the Xenomai docs.

Anyhow, the timeout value to use is of type RTIME and not the POSIX timeval. 
This is, AFAIK, the only difference to the well known prototype. There is an 
example for rt_dev_select in the RTAI showroom.

HTH::Bernhard

>>    I am trying to transform a non-realtime program to a realtime program. 
>> Can I
>> convert 'struct timecal * timeut' to 'nanosecs_rel_t timeout' compulsorily?
>>
>> Thank you for your help.
>>  
>> Susan
>>
> 
> Jan
> 

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to