From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org, dietmar.schindler@domain.hid
Subject: Re: [Xenomai-help] message pipe message boundaries
Date: Wed, 11 May 2011 11:20:44 +0200 [thread overview]
Message-ID: <1305105644.2098.17.camel@domain.hid> (raw)
In-Reply-To: <4DCA52E8.80904@domain.hid>
On Wed, 2011-05-11 at 11:12 +0200, Gilles Chanteperdrix wrote:
> On 05/09/2011 09:36 AM, dietmar.schindler@domain.hid wrote:
> >> From: Gilles Chanteperdrix
> >> [mailto:gilles.chanteperdrix@xenomai.org] Sent: Thursday, May 05,
> >> 2011 10:15 AM ... You can provide the readv implementation, and
> >> implement read in terms of readv by passing an iovec with just one
> >> buffer. Please also try and make the code a bit more readable than
> >> in the previous patch, with only one statement and one "if" by
> >> line.
> >
> > Hello,
> >
> > thank you for your suggestions. I now remade the patch accordingly.
> > If you have further improvements to suggest, please let me know.
>
> I am sorry to ask you to change your patch again, but the loop is quite
> hard to understand. It would be nice if you could use a simple loops
> which copies the pieces of the iovec. So, maybe use two nested loops.
>
Also, let's avoid constructs like these:
> buf = iovec->iov_base, count = iovec++->iov_len;
Disk space is cheap so we can afford a few more characters per line;
however, engineering time for tracking down issues introduced by
obfuscated code is expensive.
In short, one executable statement per line is desired, our code should
have nothing to hide.
--
Philippe.
next prev parent reply other threads:[~2011-05-11 9:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 9:48 [Xenomai-help] message pipe message boundaries dietmar.schindler
2011-04-26 20:27 ` Philippe Gerum
2011-04-27 8:50 ` dietmar.schindler
2011-04-27 12:22 ` dietmar.schindler
2011-04-27 21:42 ` Philippe Gerum
2011-04-29 6:30 ` dietmar.schindler
2011-05-03 8:15 ` dietmar.schindler
2011-05-03 11:00 ` Gilles Chanteperdrix
2011-05-03 11:27 ` dietmar.schindler
2011-05-03 17:35 ` Gilles Chanteperdrix
2011-05-04 6:36 ` dietmar.schindler
2011-05-04 6:40 ` Gilles Chanteperdrix
2011-05-04 14:34 ` dietmar.schindler
2011-05-05 8:14 ` Gilles Chanteperdrix
2011-05-09 7:36 ` dietmar.schindler
2011-05-11 9:12 ` Gilles Chanteperdrix
2011-05-11 9:20 ` Philippe Gerum [this message]
2011-05-11 10:48 ` dietmar.schindler
2011-05-11 10:55 ` Gilles Chanteperdrix
2011-05-11 11:02 ` Philippe Gerum
2011-05-19 13:09 ` dietmar.schindler
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=1305105644.2098.17.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=dietmar.schindler@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.