Hi,

>> Recall that up to Xenomai 2.4 RTDM device/socket closing may fail (with
>> -EAGAIN) when some other thread is currently using it and doesn't
>> release it immediately when being "asked". That means for now you should
>> loop over [rt_dev_]close as long as EAGAIN is returned.
> 
> Roland, could you please check the return code of [rt_dev_]close. 
> Nevertheless, I'm still puzzled why the socket shows up in 
> /proc/rtcan/sockets because rtcan_raw_close() is called before returning 
I have been battling with this all morning. I close with

do{
        ret=rt_dev_close(can_fd);
        //printf("%d",ret)
while(ret!=-9)

but this only works (without fail) if I uncomment the printf line. I 
have now tried to put in a sleep(1) command instead but due to the crash 
caused  by commenting out hte crash (does not come out of loop) I am now 
trying to save my filesystem. :( :(.





> -EAGAIN and the error mask shown there is weired as well.
> Roland, do you perform the open and close in a serialized way (same 
> task) and in nrt context?
I call the rt_dev_close in non-real time code if that is what you are 
asking. Same with the init AFAIK. I will post the code if I can retrieve it.

Roland



> 
> Wolfgang.
> 
> 
> 

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to