* [Xenomai-help] Use of Linux wake_up() system call in Xenomai RTDM thread in kernel mode
@ 2009-02-13 18:44 tarr
2009-02-13 23:45 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: tarr @ 2009-02-13 18:44 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/html, Size: 600 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-help] Use of Linux wake_up() system call in Xenomai RTDM thread in kernel mode
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
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2009-02-13 23:45 UTC (permalink / raw)
To: tarr; +Cc: xenomai
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-13 23:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.