All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mariusz Janiak" <mariuszjaniak@wp.pl>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] SIGXCPU with rt_mutex_release
Date: Tue, 08 Jan 2013 21:51:56 +0100	[thread overview]
Message-ID: <50ec86ecafe0e2.65677797@wp.pl> (raw)

> I guess the test could be simpler, simply:
> 
> rt_mutex_acquire
> rt_task_create
> rt_mutex_release
> rt_mutex_acquire
> rt_mutex_release

Yes this is minimal subset. 

> Anyway, calling rt_task_create while holding a real-time mutex is itself
> a priority inversion: any thread in primary mode waiting for the mutex
> will now have to wait for task running in secondary mode, so may be
> block during an unbounded amount of time. So, using a real-time mutex
> for this is completely useless you should be using a glibc
> pthread_mutex_t. If compiling for the posix skin, use
> __real_pthread_mutex_lock.

I deeply understand your point, but in case of OROCOS framework this mutex blocking occurs only during task creation and setting environment up. After that, when real time task perform its job, it run without blocking from secondary domain. Of course you are right that in this case the standard mutex will be better. 

> Now, how this can cause the issue you observe remains to be understood,
> and probably requires a fix.

I will be thankful for your help in solving this problem. Till then I will use Jan's patch. 

Mariusz





             reply	other threads:[~2013-01-08 20:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 20:51 Mariusz Janiak [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-08 17:42 [Xenomai] SIGXCPU with rt_mutex_release Mariusz Janiak
2013-01-08 11:12 Mariusz Janiak
2013-01-08 13:33 ` Jan Kiszka
2013-01-08 19:40   ` Gilles Chanteperdrix
2013-01-08 19:43 ` Gilles Chanteperdrix
2013-01-08 21:06   ` Jan Kiszka
2013-01-08 21:09     ` Jan Kiszka
2013-01-09 13:30     ` Jan Kiszka
2013-01-12 18:43       ` Gilles Chanteperdrix
2013-01-13 12:29         ` Jan Kiszka
2013-01-13 12:35           ` Jan Kiszka
2013-01-13 12:52             ` Gilles Chanteperdrix
2012-12-31 17:32 Mariusz Janiak
2012-12-31 17:41 ` Gilles Chanteperdrix
2012-12-31 17:52   ` Peter Soetens
2012-12-31 17:55     ` Gilles Chanteperdrix

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=50ec86ecafe0e2.65677797@wp.pl \
    --to=mariuszjaniak@wp.pl \
    --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.