mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@gmail.com>
To: "Davide Libenzi" <davidel@xmailserver.org>
Cc: "Ulrich Drepper" <drepper@redhat.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: [PATCH] eventfd, signalfd, timerfd, epoll_create w/flags
Date: Mon, 28 Apr 2008 09:12:20 +0200	[thread overview]
Message-ID: <517f3f820804280012n3e289db7mb23950cfd3ac04b1@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0804271614240.18184@alien.or.mcafeemobile.com>

On 4/28/08, Davide Libenzi <davidel@xmailserver.org> wrote:
> On Sun, 27 Apr 2008, Ulrich Drepper wrote:
>
>  > In the absence of sys_indirect we need the following patches as well.  These
>  > are all the event handling functions: epoll_create, signalfd, timerfd, eventd.
>  >
>  > There is good news and bad.  The good news is that the timerfd interface
>  > already has a flags parameter.  We just have to put it to use.  It's IMO
>  > not a good idea to use the O_* values for any of the flag parameters so I
>  > introduced new macros for all the functions.
>  >
>  > For signalfd and eventfd no flags parameter is available in the syscall.
>  > But for the userlevel interfaces I have added such a parameter back when.
>  > They are just required to be zero so far.  This means the new syscalls
>  > will completely transparently be used once glibc knows about them.
>  > Programs can start using the new flags and get told when the implementation
>  > doesn't support it.
>  >
>  > The bad case is epoll_create.  Neither the kernel nor the userlevel interface
>  > has a flags parameter.  So we need a new, additional interface.  We could have
>  > one which differs from epoll_create only in that it returns a file descriptor
>  > with close-on-exec already set.  I don't like that.  Instead, the patch adds
>  > a new interface with a flags parameter.  More flexibility in future.
>
>
> Ok, I asked this myself for about ten minutes, than I gave up. But why
>  sys_epoll_createp() instead of sys_epoll_create2()? There MUST be a reason
>  to deviate from the standard of all the other ones...
>  The one between sys_indirect and syscall explosion is the battle of the
>  ugly.
>  Besides that, patches look fine to me (though w/out a very good reason, I
>  prefer sys_epoll_create2() instead of sys_epoll_createp()).

This "p" doesn't follow convention.  The "p" that has appeared on some
syscalls is by analogy with pselect().

pselect() = select() + a sigset parama=ter.

I seem to recall that the "p" is because this was a POSIX invention.

Anyway, the "p" has been added to a number of other Linux syscalls
that have likewise added a sigset:

poll() --> ppoll()
epoll_wait() --> epoll_pwait()
and now: accept() --> paccept()

Adding a "p" to the name epoll_create() would be a mistake by this convention.

      parent reply	other threads:[~2008-04-28  7:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 22:17 Ulrich Drepper
2008-04-27 23:20 ` Davide Libenzi
2008-04-27 23:27   ` Ulrich Drepper
2008-04-27 23:31     ` H. Peter Anvin
2008-04-27 23:33       ` Ulrich Drepper
2008-04-27 23:38         ` H. Peter Anvin
2008-04-28  0:07     ` Davide Libenzi
2008-04-28  7:12   ` Michael Kerrisk [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=517f3f820804280012n3e289db7mb23950cfd3ac04b1@mail.gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.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®