mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-api@vger.kernel.org
Subject: Re: [patch/rfc] eventfd semaphore-like behavior
Date: Mon, 30 Aug 2010 07:22:57 -0700 (PDT)	[thread overview]
Message-ID: <alpine.OSX.2.00.1008300721400.175@Macintosh-3.local> (raw)
In-Reply-To: <AANLkTim_seWr0LZJyC+dPBy-N+_NkzTx21vte7qrwunC@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1672 bytes --]

On Mon, 30 Aug 2010, Michael Kerrisk wrote:

> On Thu, Feb 5, 2009 at 2:02 AM, Davide Libenzi <davidel@xmailserver.org> wrote:
> > On Thu, 5 Feb 2009, Michael Kerrisk wrote:
> >
> >> > Dunno.  Probably try the syscall and see if it returned -EINVAL.  Does
> >> > that work in this case?
> >>
> >> As youll have seen by now, Ulrich and I noted that it works.
> >>
> >> > If so, it would be sensible to mention this in
> >> > the description somewhere as the approved probing method and to
> >> > maintain it.
> >>
> >> I'll add something to the man page, as this patch progresses.
> >
> > I see we already have stuff like this inside the man pages:
> >
> > O_CLOEXEC (Since Linux 2.6.23)
> >          Enable the close-on-exec flag for the new file descriptor.
> >          ...
> >
> > Maybe a similar note for the new flag?
> 
> It took a while, but here's the new text in the eventfd.2 (will be in
> man-pages-2.36). Could you please ACK, Davide?
> 
>        EFD_SEMAPHORE (since Linux 2.6.30)
>               Provide semaphore-like semantics  for  reads  from
>               the new file descriptor.  See below.
> ...
>               *  If EFD_SEMAPHORE  was  not  specified  and  the
>                  eventfd  counter  has  a  nonzero value, then a
>                  read(2) returns 8 bytes containing that  value,
>                  and the counter's value is reset to zero.
> 
>               *  If  EFD_SEMAPHORE was specified and the eventfd
>                  counter has a nonzero  value,  then  a  read(2)
>                  returns 8 bytes containing the value 1, and the
>                  counter's value is decremented by 1.

Looks fine to me.


- Davide

  parent reply	other threads:[~2010-08-30 14:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 22:58 Davide Libenzi
2009-02-04 23:05 ` Andrew Morton
2009-02-04 23:18   ` Davide Libenzi
2009-02-04 23:24     ` Andrew Morton
2009-02-04 23:27       ` Davide Libenzi
2009-02-04 23:48         ` Michael Kerrisk
2009-02-04 23:55         ` Andrew Morton
2009-02-04 23:59           ` Michael Kerrisk
2009-02-05  0:02             ` Davide Libenzi
2010-08-30  5:21               ` Michael Kerrisk
2010-08-30  5:24                 ` Michael Kerrisk
2010-08-30 14:22                 ` Davide Libenzi [this message]
2009-02-05  0:18             ` Andrew Morton
2009-02-05  0:25               ` Davide Libenzi
2009-02-05  0:34                 ` Andrew Morton
2009-02-05  0:26               ` Michael Kerrisk
2009-02-04 23:45   ` Ulrich Drepper
2009-02-04 23:49     ` Michael Kerrisk
2009-02-09  7:45 ` Michael Kerrisk
2009-02-09 17:39   ` Davide Libenzi
     [not found] <499E527B.2030702@fastmq.com>
2009-02-20  7:00 ` Martin Sustrik

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=alpine.OSX.2.00.1008300721400.175@Macintosh-3.local \
    --to=davidel@xmailserver.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --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®