From: Philippe Gerum <rpm@xenomai.org>
To: tarr@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Use of Linux wake_up() system call in Xenomai RTDM thread in kernel mode
Date: Sat, 14 Feb 2009 00:45:20 +0100 [thread overview]
Message-ID: <49960610.2090207@domain.hid> (raw)
In-Reply-To: <20090213114426.b684eb1399accf59cf50bd4742b49228.7ef98e2e0b.wbe@domain.hid>
tarr@domain.hid wrote:
> Folks --
>
> I would like to use a Linux wake_up() system call in a RTDM periodic task
> to signal a Linux driver xxx_poll() function that uses the poll_wait().
>
> Is this appropriate?
>
Nope.
> If so, should I disable interrupts in the xxx_poll() function around the
> poll_wait()
> using the rtdm_lock_irqsave()?
>
> If not, any suggestions on how to get the same functionality?
>
You have to go through a proxy to do that; calling a regular kernel service from
an RTDM task context in kernel space which only runs in primary mode would sink
the boat. Remember that Xenomai may have preempted the Linux machinery in the
middle of nowhere to process an event, which turned out to reschedule your RTDM
task immediately, regardless of what Linux was doing at that time.
RTDM has a dedicated interface to create such proxies, namely rtdm_nrtsig_*
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__nrtsignal.html
In short, the code should register a non-RT handler (rtdm_nrtsig_init) which the
RT side can schedule for execution (rtdm_nrtsig_pend), as soon as Xenomai
quiesces and Linux gets back in control in a safe context. The handler in
question runs in a virtual interrupt context, so wake_up() may be called from
there, like anything you may call from a regular Linux IRQ handler.
> My thanks for any assistance.
>
> Cheers --
> Steve Tarr
> tarr@domain.hid
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
prev parent reply other threads:[~2009-02-13 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 18:44 [Xenomai-help] Use of Linux wake_up() system call in Xenomai RTDM thread in kernel mode tarr
2009-02-13 23:45 ` 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=49960610.2090207@domain.hid \
--to=rpm@xenomai.org \
--cc=tarr@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.