All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Re : Problem with rt_pipe and user space communication
@ 2007-07-19  8:33 Mathieu JOINIE-MAURIN
  0 siblings, 0 replies; only message in thread
From: Mathieu JOINIE-MAURIN @ 2007-07-19  8:33 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]

Hi,

So i tried again this morning by sending an array of 3 doubles on my real time side (with rt_pipe_stream). On user space, I get as expected 24 bytes which matches the size of 3 doubles. But I cannot get more datas and I still do not understand why. My real time function runs periodically every 1 ms and my userspace function runs in background or periodically (around 500ms). What do I do wrong so that when I use the read(2) function it only reads datas by group (as if there was message boundary).

Thanks in advance,

Mathieu

----- Message d'origine ----
De : Philippe Gerum <rpm@xenomai.org>
À : Mathieu JOINIE-MAURIN <mjoiniem@domain.hid>
Cc : xenomai@xenomai.org le : Mercredi, 18 Juillet 2007, 19h48mn 37s
Objet : Re: [Xenomai-help] Problem with rt_pipe and user space communication

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.









      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

[-- Attachment #2: Type: text/html, Size: 2950 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-19  8:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19  8:33 [Xenomai-help] Re : Problem with rt_pipe and user space communication Mathieu JOINIE-MAURIN

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.