All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Davide Libenzi <davidel@xmailserver.org>
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 22:43:00 -0700	[thread overview]
Message-ID: <481563E4.5090408@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0804272200090.18184@alien.or.mcafeemobile.com>

-----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.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkgVY+QACgkQ2ijCOnn/RHTN9gCdG6HxUENiLQqmSFPc5LMAcHna
Nc0AnAhma85jwTCS+XTsQ/MrNngQAT+i
=3vVs
-----END PGP SIGNATURE-----

  reply	other threads:[~2008-04-28  5:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28  3:15 [PATCH v2] eventfd, signalfd, timerfd, epoll_create w/flags Ulrich Drepper
2008-04-28  5:11 ` Davide Libenzi
2008-04-28  5:43   ` Ulrich Drepper [this message]
2008-04-28  6:06     ` Davide Libenzi

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=481563E4.5090408@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --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 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.