On 28/02/07, Preetam Joshi <[EMAIL PROTECTED]> wrote:
Hi i have a problem in my code the rt_sem_create calls returns a negative
value i.e. -17
THat is semaphore creation fails? Why is it so?
rt_sem_create()'s docs describe all the possible return values. -17 ==
-EEXIST (it's one of the possible errno values you may find in the
standard libc include files).
What probably happens in your case is as described below:
(look at the section for semaphores in /proc/xenomai/registry/)
-----------------------------------------------
1. On program start after previous crash i unable to create named mutex,
because it [-EEXIST], after bind it's unable to operate with it because
it locked by task from early died program, i have to restart computer.
Any suggestions?
Something like this would do:
if (rt_mutex_bind("...", &desc) == 0)
rt_mutex_delete(&desc);
rt_mutex_create("...", &desc);
--
Best regards,
Dmitry Adamushko
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help