From: Davide Libenzi <davidel@xmailserver.org>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] eventfd, signalfd, timerfd, epoll_create w/flags
Date: Sun, 27 Apr 2008 23:06:03 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0804272301270.18184@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <481563E4.5090408@redhat.com>
On Sun, 27 Apr 2008, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Davide Libenzi wrote:
> > unsigned int oflags_remap(const struct oflags_rmap *m, int n,
> > int f, int *rf)
> > {
> > int i;
> > for (i = 0, *rf = 0; i < n; i++, m++)
> > if (f & m->f) {
> > *rf |= m->of;
> > f &= ~m->f;
> > }
> > return f ? -EINVAL: 0;
> > }
>
> This will be more expensive in terms of code and runtime. Plus: who
> knows whether there will really be other flags which can be used like
> this? I think it's overkill to do this. If at some point there are
> more flags which are handled the same way one could do something like
> this but I don't think it's necessary now.
There are already, not one, not two, not three, but four call sites where
an aweful cut&paste is used to basically do the same thing. And probably
there's another one you likely did for the sockets.
- Davide
prev parent reply other threads:[~2008-04-28 6:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 3:15 Ulrich Drepper
2008-04-28 5:11 ` Davide Libenzi
2008-04-28 5:43 ` Ulrich Drepper
2008-04-28 6:06 ` Davide Libenzi [this message]
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=Pine.LNX.4.64.0804272301270.18184@alien.or.mcafeemobile.com \
--to=davidel@xmailserver.org \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®