All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Umair Ali <ali.umair@tut.fi>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Send interrupt from RTDM kernel module to userspace app
Date: Wed, 18 May 2016 08:49:24 +0200	[thread overview]
Message-ID: <20160518064924.GH1722@hermes.click-hack.org> (raw)
In-Reply-To: <20160518064554.GG1722@hermes.click-hack.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


      reply	other threads:[~2016-05-18  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 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=20160518064924.GH1722@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=ali.umair@tut.fi \
    --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.