From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Mutex enhancement for Auto relaxed threads
Date: Tue, 27 Nov 2012 14:47:53 +0100 [thread overview]
Message-ID: <50B4C489.1080404@siemens.com> (raw)
In-Reply-To: <50B4C422.6050709@xenomai.org>
On 2012-11-27 14:46, Gilles Chanteperdrix wrote:
> On 11/23/2012 12:15 PM, Jan Kiszka wrote:
>> On 2012-11-22 17:55, Michael Pustylnik wrote:
>>> Although you can use mutexes in this order, why would you want to do that? Logically, unlocking mutex1 would mean finishing some operation started when mutex1 was locked. If as a part of the operation you locked mutex2 and haven't unlocked it yet, that would mean you haven't completed your operation yet, and unlocking mutex1 at this point would probably be a bug. Am I wrong?
>>
>> I'm not aware that POSIX or some other APIs Xenomai implements forbid
>> such an ordering. And you never know if there is weird convoluted legacy
>> code out there that depends on exactly this.
>>
>> However, I think you can avoid the limitation by attaching the property
>> "trap to kernel on mutex lock" to the thread instead of some mutex,
>> analogously to xeno_current_mode.
>
> I think the simplest solution to implement this is to share the
> resources count between user and kernel, using a pthread_key in
> user-space. However, I really do not see how to do this without breaking
> the ABI, so, this really is material for xenomai-forge, not for 2.6.
For sure.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2012-11-27 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 15:51 [Xenomai] Mutex enhancement for Auto relaxed threads Makarand Pradhan
2012-11-22 16:15 ` Gilles Chanteperdrix
2012-11-22 16:47 ` Makarand Pradhan
2012-11-22 19:24 ` Makarand Pradhan
2012-11-22 19:41 ` Makarand Pradhan
2012-11-22 16:55 ` Michael Pustylnik
2012-11-23 11:15 ` Jan Kiszka
2012-11-27 13:46 ` Gilles Chanteperdrix
2012-11-27 13:47 ` Jan Kiszka [this message]
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=50B4C489.1080404@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=gilles.chanteperdrix@xenomai.org \
--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.