All of lore.kernel.org
 help / color / mirror / Atom feed
From: Makarand Pradhan <makarandpradhan@ruggedcom.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: Thu, 22 Nov 2012 11:47:10 -0500	[thread overview]
Message-ID: <50AE570E.10003@ruggedcom.com> (raw)
In-Reply-To: <50AE4F97.8030102@xenomai.org>

Hi Gilles,

lock mutex1
lock mutex2
unlock mutex1
unlock mutex2

As per my current implementation, I expect the thread to relax after 
unlocking mutex1. If another RT thread starts waiting on mutex2, I 
expect the thread holding the mutex will harden and start running in 
primary again. Will quickly test this and get back.

I did consider this scenario but since we never use such a behaviour in 
our system, did not pursue it further.

This brings up another question that I was contemplating. Do we want to 
harden unless there is another RT thread wanting this mutex? If not then 
the implementation becomes simpler and the scenario mentioned would also 
get addressed automatically.

Rgds,
Mak.


> I did not look in details at your code, but what if I do
>
> lock mutex1
> lock mutex2
> unlock mutex1
> unlock mutex2
>
> ?
>


-- 
___________________________________________________________________________
NOTICE OF CONFIDENTIALITY:
This e-mail and any attachments may contain confidential and privileged information.  If you are
not the intended recipient, please notify the sender immediately by return e-mail and delete this
e-mail and any copies.  Any dissemination or use of this information by a person other than the
intended recipient is unauthorized and may be illegal.
_____________________________________________________________________

  



  reply	other threads:[~2012-11-22 16: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 [this message]
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

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=50AE570E.10003@ruggedcom.com \
    --to=makarandpradhan@ruggedcom.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.