All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Petr Cervenka <grugh@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rtdm_event_timedwait hang-up
Date: Mon, 20 Mar 2006 14:59:52 +0100	[thread overview]
Message-ID: <441EB558.9040408@domain.hid> (raw)
In-Reply-To: <200603201434.15258@domain.hid>

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

Petr Cervenka wrote:
> Hello,
> I'm trying to port a  driver of a AD card to RTDM.
> When I use rtdm_event_timedwait in IOCTL handler (called from NRT user app), the system will hang-up immediately.
> Does it have something to do with: https://mail.gna.org/public/xenomai-help/2006-03/msg00035.html
> , ie. it's not possible to call wait /caller blocking functions from non-real-time, is it?

Yep, that's exactly the point, it's an illegal usage.

And the fact that this still causes a crash instead of some more
graceful failure reminds me of one reason why I asked for the new
XENO_ASSERT macro: adding debug checks for such mistakes to RTDM.

> Is there a posibility to do some workaround to solve this or other alternative. I need to wait couple of seconds for IRQ from device.

A) turn the waiter into a xenomai shadow thread, even if it will wait
for several seconds without hard timing constraints (use priority 1 e.g.)

B) signal the event arrival via rtdm_nrtsig to a Linux handler which
could in turn wake up a non-RT waiter blocking on standard Linux
wait_queue or so

The latter options involves more work and code and should only be picked
if A) is really not desired.

> 
> My configuration: kernel-2.6.15.6, adeos-ipipe-2.6.15-i386-1.2-01, xenomai-2.1.0
> Thanks for any help
> 
> Petr Cervenka
> 

Jan


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

  reply	other threads:[~2006-03-20 13:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 13:34 [Xenomai-help] rtdm_event_timedwait hang-up Petr Cervenka
2006-03-20 13:59 ` Jan Kiszka [this message]
2006-03-20 14:27   ` Philippe Gerum
2006-03-20 14:56     ` Jan Kiszka
2006-03-20 15:27       ` Philippe Gerum
2006-03-20 16:13         ` Jan Kiszka
2006-03-20 16:20 ` Jan Kiszka
2006-03-20 16:54   ` Philippe Gerum
2006-03-20 17:02     ` Jan Kiszka
2006-03-20 17:26       ` Philippe Gerum
2006-03-21  0:48         ` Alexis Berlemont
2006-03-21  2:04           ` Jan Kiszka
2006-03-21  2:04           ` [Xenomai-core] COMEDI over RTDM (was: rtdm_event_timedwait hang-up) Jan Kiszka
2006-03-22  1:24             ` [Xenomai-core] " Alexis Berlemont
2006-03-24 17:31               ` [Xenomai-core] Re: COMEDI over RTDM Jan Kiszka
2006-03-20 18:01   ` [Xenomai-help] rtdm_event_timedwait hang-up Petr Cervenka
2006-03-20 23:02     ` Jan Kiszka
2006-03-20 23:31       ` Jeff Webb
2006-03-21 14:03       ` [Xenomai-help] rtdm_event_timedwait hang-up - SOLVED Petr Cervenka
2006-03-21 14:17         ` Philippe Gerum
2006-03-21 15:17         ` Jan Kiszka
2006-03-21 16:29           ` Philippe Gerum
2006-03-21 16:56             ` Jan Kiszka
2006-03-21 17:34               ` Philippe Gerum
2006-03-21 18:18                 ` 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=441EB558.9040408@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=grugh@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.