Landau, Bracha wrote:
> I'm using Xenomai 2.2 rc2 on an MPC8247 board.
You should be using 2.2 rc3, it implements per-process cleanup, so even
if pthread_mutex_destroy fails, if the mutex is not shared between
several processes, it will automatically be destroyed when the
application terminates.
> When I try to destroy a mutex I get error x10 (EBUSY).
> The mutex is not locked.
EBUSY is also returned if the mutex is currently "bound" to a condition
variable, that is, if some thread is currently blocked in a call to
pthread_cond_wait using the mutex as second argument. In this case, the
application is expected to cancel the thread blocked in the call to
pthread_cond_wait, the said thread is expected to have
pthread_cleanup_pushed a cleanup function unlocking the mutex. Only then
the application can destroy the mutex with pthread_mutex_destroy.
When I run the same code with the regular pthreads library the function does
not return an error.
> Is this a Xenomai bug?
Maybe, maybe not. Could you provide a small program showing the bug ?
--
Gilles Chanteperdrix.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help