mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
unix: add Eventfd function on Linux
Add support for the eventfd2 syscall on Linux. Use the eventfd2 syscall instead of eventfd, as the latter does not provide a flags argument and glibc also maps its eventfd() function to the eventfd2 syscall, see the Notes section in http://man7.org/linux/man-pages/man2/eventfd.2.html Also add the corresponding flags values EFD_CLOEXEC, EFD_NONBLOCK and EFD_SEMAPHORE. Change-Id: Ia8c99e68d5966ab5c7ebe7e45423943fd7d8214e Reviewed-on: https://go-review.googlesource.com/45093 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
b9e8d468b0
commit
0b25a408a5
+2
-1
@@ -143,6 +143,7 @@ struct ltchars {
|
||||
|
||||
#include <bits/sockaddr.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
@@ -375,7 +376,7 @@ ccflags="$@"
|
||||
$2 ~ /^SYSCTL_VERS/ ||
|
||||
$2 ~ /^(MS|MNT)_/ ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
|
||||
$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
||||
$2 !~ "NLA_TYPE_MASK" &&
|
||||
|
||||
Reference in New Issue
Block a user