All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Mathieu JOINIE-MAURIN <mjoiniem@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with rt_pipe and user space	communication
Date: Wed, 18 Jul 2007 19:48:37 +0200	[thread overview]
Message-ID: <1184780917.13258.79.camel@domain.hid> (raw)
In-Reply-To: <314537.73250.qm@domain.hid>

On Wed, 2007-07-18 at 14:43 +0000, Mathieu JOINIE-MAURIN wrote:
> Hi everybody,
> 
> I try to learn Xenomai. I have a problem that I do not understand. I
> want that my real time task to communicate with my user space task
> through a pipe (FIFO) in order to save sample datas in a file. My
> problem is the following. I create a pipe with:

<snip>
> 
> I get a value of 8 for nb_read which corresponds to sizeof(double).
> But i am expecting more. I do not know why the system function read(2)
> works like this.
> 
The user-space side seems to read double values as soon as they are
written to the pipe (i.e. try sending two doubles in a row at each
kernel-side write op), so this behaviour would be the expected one.

Sidenote: rt_pipe_stream will not keep message boundaries (e.g. writing
8 + 4 + 4 may cause the read side to get 12 + 4); rt_pipe_send/write
will keep the boundaries intact.

> Thank you in advance for your help,
> 
> Mathieu
> 
> 
> 
> ______________________________________________________________________
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers
> Yahoo! Mail 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




      reply	other threads:[~2007-07-18 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 14:43 [Xenomai-help] Problem with rt_pipe and user space communication Mathieu JOINIE-MAURIN
2007-07-18 17:48 ` Philippe Gerum [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=1184780917.13258.79.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=mjoiniem@domain.hid \
    --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.