Nadym Salem wrote:
> Hi,
> 
> is there a way to find out with which kind of error rt_dev_close returns ?
> Linux close() sets the errno, checking errno after rt_dev_close returns
> negative tells me "success". rt_dev_close returns with -524.

Check

http://www.xenomai.org/documentation/branches/v2.3.x/html/api/group__userapi.html#ga34c1ddf4e2deb727a1ab3cd648ce5d9

vs.

http://www.xenomai.org/documentation/branches/v2.3.x/html/api/group__posix__shm.html#gafbcde67669a1b96577e735ddebd8634

> 
> I guess it has sth. to do with the note in rt_dev_close documentation. The
> open and socket call were made in a none xenomai context. I should leave
> the context before closing, but don't really know how.

Just avoid opening RTnet sockets in RT context (*), i.e. inside a shadow
task in primary mode. Normally, this is no problem as, even if the
caller is a shadow thread, there are Linux services executed before
[rt_dev_]socket() so that you are still in secondary mode.

For the rare case you aren't, Xenomai allows also manual mode
transition, see API docs (rt_task_set_mode, e.g.). But that is really
the exception.

> 
> Greets, Nadym
> 
> PS: Configuration is the same as my last mail.
> 

Jan

(*) I'm considering to snipe the related support (device/socket creation
from RT contexts) in later RTnet and RTDM versions anyway to avoid this
mess. It turned out to provide not much use in real life while cause
design havocs even down to Xenomai.

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to