All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Markus Seemann <International-Asso@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Deadlock with interrupt shield activated / Avoid mode switches at compile time
Date: Wed, 28 Jul 2010 10:50:41 +0200	[thread overview]
Message-ID: <4C4FEF61.4090301@domain.hid> (raw)
In-Reply-To: <638179785.1790459.1280306472842.JavaMail.fmail@domain.hid>

Markus Seemann wrote:
> Hello,
> 
> a more theoretical question:
> 
> Is it possible to provocate a deadlock while switching a RTTask from
> primary mode to secondary mode when the interrupt shield is
> activated? Perhaps with this kind of scenario: - linux process takes
> semaphore - RTTask switches to secondary mode and also tries to take
> this semaphore - The semaphore would be released in ISR context of
> the linux kernel. But the interrupt shield prevents the execution of
> this isr.
> 
> How realistic is this scenario?

Does not look very realistic, but it is possible. Anyway, the interrupt
shield no longer exists in Xenomai 2.5.

> 
> 
> Another question: Is it possible to avoid mode switches for realtime
> tasks at compile time for a specific task?

No. But we provide a way to detect and act upon them at run-time.

When a switch to secondary mode happens, it is necessary to get the task
to continue running, so, the only way to handle such situation would be
to destroy the task in need for a switch to secondary mode.

-- 
					    Gilles.


  reply	other threads:[~2010-07-28  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28  8:41 [Xenomai-help] Deadlock with interrupt shield activated / Avoid mode switches at compile time Markus Seemann
2010-07-28  8:50 ` Gilles Chanteperdrix [this message]
2010-07-31 10:35 ` Philippe Gerum

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=4C4FEF61.4090301@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=International-Asso@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.