From: Markus Franke <Markus.Franke@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_pipe_write() returns -ENOMEM
Date: Tue, 06 Mar 2007 00:51:23 +0100 [thread overview]
Message-ID: <45ECACFB.9060703@domain.hid> (raw)
In-Reply-To: <17900.31172.233075.597047@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
Well, I just want to use the RT Pipes as if they are a normal fifo. That
is, the fifo has a bounded amount of memory and if the number of written
bytes exceeds this threshold the data which was firstly written into the
fifo should be dropped. By the way, I am using rt_pipe_write() and
rt_pipe_read() because I just want to exchange simple integer values.
Thanks for help,
Markus Franke
Gilles Chanteperdrix wrote:
> Gilles Chanteperdrix wrote:
> > Markus Franke wrote:
> > > OK. And if there is an overflow is there anything I can do during
> > > runtime, e.g. just to overwrite the data in the queue?
> >
> > Why not something like:
> >
> > while (-ENOMEM == rt_pipe_write(pipe, buf, size, mode)) {
> > RT_PIPE_MSG *msg;
> > rt_pipe_receive(pipe, &msg, TM_INFINITE);
> > rt_pipe_free(pipe, msgp);
> > }
>
> This will not work: pipe are a two-ways communication channel, so that
> calling rt_pipe_receive returns messages that were sent from
> user-space, and not the messages previously sent with rt_pipe_write. I
> am afraid what you want to do is not what rt pipes were designed for.
>
--
Nichts ist so praktisch wie eine gute Theorie!
[-- Attachment #2: Markus.Franke.vcf --]
[-- Type: text/x-vcard, Size: 245 bytes --]
begin:vcard
fn:Markus Franke
n:Franke;Markus
adr;quoted-printable:;;Vettersstra=C3=9Fe 64/722;Chemnitz;Saxony;09126;Germany
email;internet:Markus.Franke@domain.hid
x-mozilla-html:FALSE
url:http://www.tu-chemnitz.de/~franm
version:2.1
end:vcard
next prev parent reply other threads:[~2007-03-05 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 16:10 [Xenomai-help] rt_pipe_write() returns -ENOMEM Markus Franke
2007-03-05 16:17 ` Gilles Chanteperdrix
2007-03-05 16:53 ` Markus Franke
2007-03-05 17:12 ` Gilles Chanteperdrix
2007-03-05 17:54 ` Markus Franke
2007-03-05 18:30 ` Gilles Chanteperdrix
2007-03-05 20:12 ` Gilles Chanteperdrix
2007-03-05 23:51 ` Markus Franke [this message]
2007-03-08 15:55 ` 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=45ECACFB.9060703@domain.hid \
--to=markus.franke@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.