Bug#589504: eventfd manpage should mention EFD_SEMAPHORE
Michael Kerrisk mtk.manpa...@gmail.com writes: tags 589504 fixed-upstream thanks On Sun, Jul 18, 2010 at 12:34 PM, Goswin von Brederlow goswin-...@web.de 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 debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#589504: eventfd manpage should mention EFD_SEMAPHORE
tags 589504 fixed-upstream thanks On Sun, Jul 18, 2010 at 12:34 PM, Goswin von Brederlow goswin-...@web.de 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/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#589504: eventfd manpage should mention EFD_SEMAPHORE
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. MfG Goswin -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.31.6-xen-2010.02.18 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages manpages-dev depends on: ii manpages 3.24-1 Manual pages about using a GNU/Lin manpages-dev recommends no packages. Versions of packages manpages-dev suggests: ii man-db [man-browser] 2.5.7-3on-line manual pager -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org