Michael Kerrisk <[email protected]> writes:

> tags 589504 fixed-upstream
> thanks
>
> On Sun, Jul 18, 2010 at 12:34 PM, Goswin von Brederlow
> <[email protected]> wrote:
>> Package: manpages-dev
>> Version: 3.24-1
>> Severity: normal
>> File: /usr/share/man/man2/eventfd.2.gz
>>
>> Hi,
>>
>> the eventfd manpage lists only 2 flags, EFD_NONBLOCK and EFD_CLOEXEC,
>> while there is a thrid flag: EFD_SEMAPHORE.
>>
>> EFD_SEMAPHORE changes the behaviour of eventfd_read() to decrement the
>> count by 1 and return 1 instead of the current count. Please add
>> documentation for this to the manpage.
>
> Hello Goswin,
>
> This report finally prodded me to do something that had long been on
> my TODO list. I added the following text for man-pages 3.26:
>
>        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.
>
> Cheers,
>
> Michael
>
> -- 
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Author of "The Linux Programming Interface"; http://man7.org/tlpi/

Thanks. Much appreciated.

MfG
        Goswin



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to