All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Andrey Nechypurenko <andreynech@googlemail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Qeustion about rtdm_event_timedwait
Date: Mon, 01 Oct 2012 18:05:19 +0200	[thread overview]
Message-ID: <5069BF3F.1010900@xenomai.org> (raw)
In-Reply-To: <CAOiXNkAWhi2-ZMJUx53-Lfh9EG7RP52QX5RK9KBnhjw0w6qKow@mail.gmail.com>

On 10/01/2012 06:01 PM, Andrey Nechypurenko wrote:
>> On 10/01/2012 05:51 PM, Andrey Nechypurenko wrote:
>>> driver's read() function is registered as *read_nrt*
>>
>> That is the problem.
> 
> Thank you Gilles!
> 

If you want to wake up a regular thread, you should signal an
rtdm_nrtsig in the interrupt handler, and the nrtsig handler wakes up
the linux thread using regular linux services such as wake_up(). But in
that case, of course, do not expect low latencies for this thread.

Also note that rtdm_event_wait works like a semaphore, not like a
condition variable: it has a counter, rtdm_event_wait will return
immediately as many times as rtdm_event_signal was called.

-- 
					    Gilles.


  reply	other threads:[~2012-10-01 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 15:51 [Xenomai] Qeustion about rtdm_event_timedwait Andrey Nechypurenko
2012-10-01 15:57 ` Gilles Chanteperdrix
2012-10-01 16:01   ` Andrey Nechypurenko
2012-10-01 16:05     ` Gilles Chanteperdrix [this message]
2012-10-01 16:10       ` Andrey Nechypurenko
2012-10-01 16:13         ` Andrey Nechypurenko
2012-10-01 16:20           ` Gilles Chanteperdrix

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=5069BF3F.1010900@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=andreynech@googlemail.com \
    --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.