* [Xenomai] Send interrupt from RTDM kernel module to userspace app
@ 2016-05-17 13:51 Umair Ali
2016-05-18 6:45 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Umair Ali @ 2016-05-17 13:51 UTC (permalink / raw)
To: xenomai@xenomai.org
Hello,
I need to send an interrupt from Rtdm kernel device to initiate the action in the userspace application. The interrupt will be send periodically by using kernel timers. Can someone give me the example how I can do send the interrupt from Rtdm module and read the interrupt in the userspace. I have read these articles
http://stackoverflow.com/questions/33041199/sending-realtime-signal-from-a-kernel-module-to-user-space-fails
Can anyone tell me how can I implement the above in rtdm modul. Give me example
Thanks & BR
Ali
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] Send interrupt from RTDM kernel module to userspace app
2016-05-17 13:51 [Xenomai] Send interrupt from RTDM kernel module to userspace app Umair Ali
@ 2016-05-18 6:45 ` Gilles Chanteperdrix
2016-05-18 6:49 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2016-05-18 6:45 UTC (permalink / raw)
To: Umair Ali; +Cc: xenomai@xenomai.org
On Tue, May 17, 2016 at 01:51:59PM +0000, Umair Ali wrote:
> Hello,
>
> I need to send an interrupt from Rtdm kernel device to initiate the action in the userspace application. The interrupt will be send periodically by using kernel timers. Can someone give me the example how I can do send the interrupt from Rtdm module and read the interrupt in the userspace. I have read these articles
> http://stackoverflow.com/questions/33041199/sending-realtime-signal-from-a-kernel-module-to-user-space-fails
> Can anyone tell me how can I implement the above in rtdm modul. Give me example
Xenomai 3 does not support asynchronous signals. You can use
synchronous signals with sigwait, but that is uselessly complicated.
What you want is probably to have the thread blocked on read() or
ioctl() and wake it up when the event you are interested in happens,
this is how drivers usually work.
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] Send interrupt from RTDM kernel module to userspace app
2016-05-18 6:45 ` Gilles Chanteperdrix
@ 2016-05-18 6:49 ` Gilles Chanteperdrix
0 siblings, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2016-05-18 6:49 UTC (permalink / raw)
To: Umair Ali; +Cc: xenomai@xenomai.org
On Wed, May 18, 2016 at 08:45:54AM +0200, Gilles Chanteperdrix wrote:
> On Tue, May 17, 2016 at 01:51:59PM +0000, Umair Ali wrote:
> > Hello,
> >
> > I need to send an interrupt from Rtdm kernel device to initiate the action in the userspace application. The interrupt will be send periodically by using kernel timers. Can someone give me the example how I can do send the interrupt from Rtdm module and read the interrupt in the userspace. I have read these articles
> > http://stackoverflow.com/questions/33041199/sending-realtime-signal-from-a-kernel-module-to-user-space-fails
> > Can anyone tell me how can I implement the above in rtdm modul. Give me example
>
> Xenomai 3 does not support asynchronous signals. You can use
> synchronous signals with sigwait, but that is uselessly complicated.
> What you want is probably to have the thread blocked on read() or
> ioctl() and wake it up when the event you are interested in happens,
> this is how drivers usually work.
You have examples in xenomai sources, see for instance ioctl
RTTST_RTIOC_INTERM_BENCH_RES in:
https://git.xenomai.org/xenomai-gch.git/tree/kernel/drivers/testing/timerbench.c?h=next
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-18 6:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 13:51 [Xenomai] Send interrupt from RTDM kernel module to userspace app Umair Ali
2016-05-18 6:45 ` Gilles Chanteperdrix
2016-05-18 6:49 ` Gilles Chanteperdrix
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.