Leandro Favarin wrote:
> On Tue, Jul 20, 2010 at 3:21 AM, Jan Kiszka <jan.kis...@web.de> wrote:
>> Leandro Favarin wrote:
>>> Hi all,
>>>
>>> I have two executable files that communicate with each other through
>>> sockets (UDP), both running in the same machine.
>>> In the first scenario I made one executable (let's call him client)
>>> that generates float values to send to the other (let's call him
>>> server), and it's working perfectly.
>>> Now I'm modifying my code to use real-time environment, but I'm stuck
>>> with the error that rt_dev_recvfrom returns (-1).
>>> I also tested with errno and it returned 0.
>> Also according to the docs, rt_dev_* returns the error directly. So -1
>> means -EPERM, and that indicates you are calling it over a non-RT task.
>>
> 
> Hi Jan,
> Thanks for helping me.
> I run a few tests here and discovered that the return value of rt_dev_socket
> is 0. How is it possible? And what it means? (because in docs the possible
> return value is positive or negative when an error occurs.)
> Am I missing something?

+0 shall be included ;). No, zero is a valid file descriptor to be
returned by rt_dev_socket (and rt_dev_open), the doc isn't correct here.

> 
>>> My system:
>>> Ubuntu 9.04 (kernel 2.6.30)
>>> Xenomai 2.4.9.1
>>> RTNet 0.9.12
>> These are outdated versions. You may face bugs that have been fixed in
>> latest releases in the meantime.
>>
>> Jan
>>
> 
> I know, but I have a few restrictions that I need to follow.

Such restriction usually only make sense when upstream fixes are
carefully tracked and, where relevant, back-ported. You have been warned.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to