From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Landau, Bracha" <BLandau@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] pthread_mutex_destroy in 2.2 rc2
Date: Thu, 29 Jun 2006 18:16:47 +0200 [thread overview]
Message-ID: <17571.64751.401752.154881@domain.hid> (raw)
In-Reply-To: <02AA386EB831044F8537A696BA785C78A6676A@ILEX5.IL.NDS.COM>
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.
next prev parent reply other threads:[~2006-06-29 16:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 15:36 [Xenomai-help] pthread_mutex_destroy in 2.2 rc2 Landau, Bracha
2006-06-29 16:16 ` Gilles Chanteperdrix [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-02 13:43 Landau, Bracha
2006-07-02 15:35 ` Gilles Chanteperdrix
2006-07-03 13:15 ` Gilles Chanteperdrix
2006-07-03 15:26 Landau, Bracha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17571.64751.401752.154881@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=BLandau@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.