All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: DOURNES Guillaume <Guillaume.DOURNES@lgm.fr>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Interrupt management under rtdm driver
Date: Wed, 14 May 2008 21:35:01 +0200	[thread overview]
Message-ID: <482B3EE5.9030702@domain.hid> (raw)
In-Reply-To: <482B3BCF.8090700@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]

Jan Kiszka wrote:
> DOURNES Guillaume wrote:
>> Since I add the watchdog option in my kernel configuration, The software doesn't block.
>> But I obtain an EPREM (-1) error on the second call of rtdm_event_timedwait, and in dmesg : Xenomai: assertion failed at kernel/xenomai/skins/rtdm/drvlib.c:919 (!xnpod_unblockable_p()).
> 
> See, that is interesting.
> 
>> I don't understand why I have this error, because the rtdm_event_timedwait is used as the 16550A rtserial rtdm driver. And I use this rtserial driver, and it works.
>> Note that this problem doesn't appears when I call rt_task_suspend just after my rtdm_event_timedwait, and I resume the task by a gets.
> 
> After having a look at your driver source meanwhile, the problem is that
> you register your IOCTL handler also for handling invocation from non-RT
> (precisely: "secondary") context. But rtdm_event_timedwait always
> requires primary (RT) context. That is something you either have to
> check in the IOCTL handler before trying to block a caller - or you
> simply do not register for nrt_ioctl (or use a different handler for the
> set of IOCTLs in that context).
> 
> The reason that suspending the caller made this issue go away was that
> you have several plain Linux services in your RT loop that switches the
> caller automatically to secondary mode. Thus the first IOCTL succeeded,
> but the second failed after re-entering it now as a plain Linux caller.

...But suspending the thread shortly before IOCTL re-entry automatically
switch it back into the right (==RT) context.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-05-14 19:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13  9:18 [Xenomai-help] gdb + multi-threaded application + Intel dual core processor + Xenomai => frozen system Kaeppeler, Oliver
2008-05-13  9:36 ` Jan Kiszka
2008-05-13 10:46   ` [Xenomai-help] Interrupt management under rtdm driver DOURNES Guillaume
2008-05-13 11:03     ` Jan Kiszka
2008-05-13 13:11       ` DOURNES Guillaume
2008-05-13 14:47         ` Jan Kiszka
2008-05-13 16:36           ` DOURNES Guillaume
2008-05-13 16:58             ` Jan Kiszka
2008-05-14  9:55               ` DOURNES Guillaume
2008-05-14 19:21                 ` Jan Kiszka
2008-05-14 19:35                   ` Jan Kiszka [this message]
2008-05-15 10:24                     ` DOURNES Guillaume
2008-05-16  7:11                       ` Jan Kiszka
2008-05-16 10:08                         ` DOURNES Guillaume
2008-05-16 11:28                           ` [Xenomai-help] Serial driver and TX events Anders Blomdell
2008-05-16 12:49                             ` Jan Kiszka
2008-05-16 13:12                               ` Anders Blomdell
2008-05-16 13:25                                 ` Jan Kiszka
2008-05-16 17:56                                   ` Anders Blomdell
2008-06-19 19:41                                     ` [Xenomai-help] Weird rt_dev_socket behaviour Anders Blomdell
2008-06-20 10:54                                       ` Jan Kiszka
2008-05-13 14:06   ` [Xenomai-help] gdb + multi-threaded application + Intel dual core processor + Xenomai => frozen system Kaeppeler, Oliver
2008-05-13 14:44     ` Jan Kiszka
2008-05-14  6:13       ` Jan Kiszka
2008-05-14 12:02         ` Kaeppeler, Oliver

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=482B3EE5.9030702@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Guillaume.DOURNES@lgm.fr \
    --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.