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 non-realtime alternative
Date: Tue, 16 May 2006 13:10:22 +0200	[thread overview]
Message-ID: <4469B31E.60506@domain.hid> (raw)
In-Reply-To: <200605161221.11119@domain.hid>

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

Petr Cervenka wrote:
> Hello,
> I need to wait in my ioctl handler for an interrrupt. Is it possible to use some rtdm_event_timedwait alternative in non-realtime?
> I'm thinking about using wait_event_interruptible_timeout. Is it a good idea or is there a better solution (e.g. rtdm_event compatible))?

So your interrupt is RT while one of your waiters is non-RT? Then you
have to forward the RT event (i.e. the IRQ occurrence) via an
rtdm_nrtsig_t from the IRQ handler to an nrtsig-event handler in non-RT
context. This handler can then wakeup non-RT waiters.

This may sound a bit complicated, but you have to remind that there is
no safe way to schedule a non-RT (Linux) thread directly from the RT
(Xenomai) domain, because all Linux scheduling services are fully
preemptible by Xenomai at any time (including the RT IRQ handler).

Hmm, as you were asking for a non-RT-safe rtdm_event now: the pattern I
described above might be generalisable to an extended rtdm_event
supporting both RT and non-RT waiters (non-RT wakers already work). Need
to think about this...

Jan


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

  reply	other threads:[~2006-05-16 11:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 10:21 [Xenomai-help] rtdm_event_timedwait non-realtime alternative Petr Cervenka
2006-05-16 11:10 ` Jan Kiszka [this message]
2006-05-16 14:33   ` Petr Cervenka
2006-05-16 14:59     ` 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=4469B31E.60506@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.