All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] writing from user space through fifo problems
@ 2008-02-21  4:58 NZG
  2008-02-21  8:08 ` Jan Kiszka
  0 siblings, 1 reply; 12+ messages in thread
From: NZG @ 2008-02-21  4:58 UTC (permalink / raw)
  To: xenomai

I've got 2 programs, one Xenomai user space real time thread and one normal 
user space program.

My normal user space is trying to pass a structure to my real time program and 
failing.

my RT thread reads in a 1ms loop with:
err = rt_pipe_read(control_pipe,k,sizeof(control_t),TM_NONBLOCK);

my regular linux program writes a real time fifo with:

int fd = open(dev, O_WRONLY|O_SYNC);
err = write(fd,&c,sizeof(c));
if(err<=0)error(0,-err, "write failed  with %d",err);
close(fd);

The user space program succeeds (write returns no error and doesn't block), 
but the RT thread never see's the data, continually returning -EINTR.

Note that if I change the real time thread to TM_INFINITE it works, but blocks 
for course, which isn't what I want, since I only want to pull out data at 
the beginning of a constant loop.

Is this the correct behavior? 
Does read have to be set up and waiting for the data to recieve it?

thx,
NZG


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-22 13:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21  4:58 [Xenomai-help] writing from user space through fifo problems NZG
2008-02-21  8:08 ` Jan Kiszka
2008-02-21  9:39   ` [Xenomai-help] Xenomai maximum latency ayoub zaki
2008-02-21  9:57     ` Gilles Chanteperdrix
2008-02-21 14:44   ` [Xenomai-help] writing from user space through fifo problems NZG
2008-02-21 15:23     ` Jan Kiszka
2008-02-22  2:45       ` NZG
2008-02-22  8:55         ` Philippe Gerum
2008-02-22 13:31           ` NZG
2008-02-22  9:00         ` Gilles Chanteperdrix
2008-02-22  9:19           ` Philippe Gerum
2008-02-22  9:25             ` Gilles Chanteperdrix

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.