From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai@xenomai.org
Subject: Re: [Xenomai] Message Pipe services behaviour
Date: Mon, 03 Nov 2014 21:18:25 +0100 [thread overview]
Message-ID: <5457E311.6000706@xenomai.org> (raw)
In-Reply-To: <20141103200314.GE18422@sisyphus.hd.free.fr>
On 11/03/2014 09:03 PM, Gilles Chanteperdrix wrote:
> On Mon, Nov 03, 2014 at 09:01:32PM +0100, Philippe Gerum wrote:
>> On 11/03/2014 07:37 PM, Steve M. Robbins wrote:
>>> On Mon, Nov 03, 2014 at 05:29:53PM +0100, Philippe Gerum wrote:
>>>
>>>> Just to make sure we are on the same page, as Dietmar mentioned in an
>>>> earlier mail, read() as implemented by the rt-pipe driver only returns
>>>> _one_ message at a time, although > 1 could be pending. One has to
>>>> iterate over a read() loop using a non-blocking fd on the /dev/rtp
>>>> device to get them all.
>>>
>>> Aha! Thanks (and to Dietmar). I completely missed this fact. I'll
>>> go re-write the read as a loop and see if it works better. I should read
>>> until the read() returns 0 (bytes read)?
>>>
>>
>> Until you get -1 with errno == EWOULDBLOCK. Zero would rather mean that
>> the other end of pipe has been disconnected, just like with a regular FIFO.
>>
>
> Just a stupid question: should not calling select then read make as
> long as there are some messages to read?
>
That would be the normal option, but Steve observes issues with this
pattern, we are trying to find out whether a loss of event notification
might be at work in the poll() handler basically. I still can't see it
reading the code though, but we cannot rule out any option at this stage.
--
Philippe.
next prev parent reply other threads:[~2014-11-03 20:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 16:11 [Xenomai] Message Pipe services behaviour Steve M. Robbins
2014-10-29 17:30 ` Philippe Gerum
2014-10-31 20:00 ` Steve M. Robbins
2014-11-01 9:54 ` Philippe Gerum
2014-11-02 0:53 ` Steve M. Robbins
2014-11-03 8:18 ` Philippe Gerum
2014-11-03 15:59 ` Steve M. Robbins
2014-11-03 16:29 ` Philippe Gerum
2014-11-03 18:37 ` Steve M. Robbins
2014-11-03 20:01 ` Philippe Gerum
2014-11-03 20:03 ` Gilles Chanteperdrix
2014-11-03 20:18 ` Philippe Gerum [this message]
2014-11-03 22:22 ` Steve M. Robbins
2014-11-03 8:54 ` dietmar.schindler
2014-11-03 9:08 ` Philippe Gerum
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=5457E311.6000706@xenomai.org \
--to=rpm@xenomai.org \
--cc=Xenomai@xenomai.org \
--cc=gilles.chanteperdrix@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.