All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Paolo Minazzi <Paolo.Minazzi@mitrol.it>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] rt_intr_wait bug during debugging
Date: Tue, 24 Sep 2013 09:38:40 +0200	[thread overview]
Message-ID: <52414180.1050909@xenomai.org> (raw)
In-Reply-To: <5240004A.6070703@mitrol.it>

On 09/23/2013 10:48 AM, Paolo Minazzi wrote:
> Hi to all,
> the problem arise when I debug an application that uses an external
> interrupt.
> Below there is a sample (pseudo) code that show how I can see the problem.
> The irq stuff is related on my specific machine, so I think it is not
> important
> give details about GPIO programming and interrupt clear (CLEAR_IRQ).
>
> To see the problem :
> 1. I put a breakpoint on the usleep
> 2. I countinue to send "c" to stop always in the breakpoint.
>

Unless you enabled non-stop mode for GDB, breakpointing the main thread 
will stop all threads, including your IRQ server. Interrupts won't be 
acked the way they should, if the relevant code lives in userland. This 
may cause all sorts of weird behaviors (*).

This is why we strongly recommend managing interrupt delivery from a 
RTDM driver - it does not have to be complex, and NOT from userland. 
This driver may then expose an interface to userland for receiving IRQ 
notifications (read, ioctl, whatever fits).

(*) You may want to check your kernel log, in case the Xenomai core 
decided to disable the interrupt line to prevent an IRQ storm.

-- 
Philippe.


      parent reply	other threads:[~2013-09-24  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23  8:48 [Xenomai] rt_intr_wait bug during debugging Paolo Minazzi
2013-09-23 18:25 ` Gilles Chanteperdrix
2013-09-24  7:26   ` Paolo Minazzi
2013-09-24  7:38 ` Philippe Gerum [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=52414180.1050909@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=Paolo.Minazzi@mitrol.it \
    --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.