All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: NZG <metalninjadragon@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] writing from user space through fifo problems
Date: Thu, 21 Feb 2008 09:08:13 +0100	[thread overview]
Message-ID: <47BD316D.3070801@domain.hid> (raw)
In-Reply-To: <200802202358.25792.ngustavson@domain.hid>

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

NZG wrote:
> 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.

Are you sure it is EINTR? A first glance at the possible code path,
specifically at xnpipe_recv, suggests that you cannot reach the line
returning this error code if TM_NONBLOCK was passed.

What Xenomai version are we talking about BTW? And, as usual:
self-contained simple test cases are always appreciated. :)

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-02-21  8:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21  4:58 [Xenomai-help] writing from user space through fifo problems NZG
2008-02-21  8:08 ` Jan Kiszka [this message]
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

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=47BD316D.3070801@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=metalninjadragon@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.