diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index e38b4ca7..d56eb43a 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -143,6 +143,7 @@ struct ltchars { #include #include +#include #include #include #include @@ -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" && diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index 6fd0ab89..77f9c54e 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -1171,6 +1171,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri //sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate1(flag int) (fd int, err error) //sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) +//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2 //sys Exit(code int) = SYS_EXIT_GROUP //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fallocate(fd int, mode uint32, off int64, len int64) (err error) @@ -1316,7 +1317,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { // EpollCtlOld // EpollPwait // EpollWaitOld -// Eventfd // Execve // Fgetxattr // Flistxattr diff --git a/unix/zerrors_linux_386.go b/unix/zerrors_linux_386.go index 5a9e559f..e8d945ec 100644 --- a/unix/zerrors_linux_386.go +++ b/unix/zerrors_linux_386.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_amd64.go b/unix/zerrors_linux_amd64.go index 1f465d61..97dc0399 100644 --- a/unix/zerrors_linux_amd64.go +++ b/unix/zerrors_linux_amd64.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_arm.go b/unix/zerrors_linux_arm.go index 6475eb7c..52f08f22 100644 --- a/unix/zerrors_linux_arm.go +++ b/unix/zerrors_linux_arm.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_arm64.go b/unix/zerrors_linux_arm64.go index 161bca71..0cfe25b2 100644 --- a/unix/zerrors_linux_arm64.go +++ b/unix/zerrors_linux_arm64.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_mips.go b/unix/zerrors_linux_mips.go index f4d0b9c8..264a136a 100644 --- a/unix/zerrors_linux_mips.go +++ b/unix/zerrors_linux_mips.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_mips64.go b/unix/zerrors_linux_mips64.go index 10f130e8..bde3efbd 100644 --- a/unix/zerrors_linux_mips64.go +++ b/unix/zerrors_linux_mips64.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_mips64le.go b/unix/zerrors_linux_mips64le.go index 5570e266..167c2282 100644 --- a/unix/zerrors_linux_mips64le.go +++ b/unix/zerrors_linux_mips64le.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_mipsle.go b/unix/zerrors_linux_mipsle.go index 4184959c..6c47abf7 100644 --- a/unix/zerrors_linux_mipsle.go +++ b/unix/zerrors_linux_mipsle.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_ppc64.go b/unix/zerrors_linux_ppc64.go index ab64fcb5..32eccbd8 100644 --- a/unix/zerrors_linux_ppc64.go +++ b/unix/zerrors_linux_ppc64.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_ppc64le.go b/unix/zerrors_linux_ppc64le.go index 0ebbf94f..eb944e67 100644 --- a/unix/zerrors_linux_ppc64le.go +++ b/unix/zerrors_linux_ppc64le.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zerrors_linux_s390x.go b/unix/zerrors_linux_s390x.go index d01da43e..35663490 100644 --- a/unix/zerrors_linux_s390x.go +++ b/unix/zerrors_linux_s390x.go @@ -325,6 +325,9 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EFD_SEMAPHORE = 0x1 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 diff --git a/unix/zsyscall_linux_386.go b/unix/zsyscall_linux_386.go index 0c2a808b..51de8489 100644 --- a/unix/zsyscall_linux_386.go +++ b/unix/zsyscall_linux_386.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_amd64.go b/unix/zsyscall_linux_amd64.go index f74c341a..19f9fe56 100644 --- a/unix/zsyscall_linux_amd64.go +++ b/unix/zsyscall_linux_amd64.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_arm.go b/unix/zsyscall_linux_arm.go index 7601ad58..47d7d538 100644 --- a/unix/zsyscall_linux_arm.go +++ b/unix/zsyscall_linux_arm.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_arm64.go b/unix/zsyscall_linux_arm64.go index da7a1c6e..7bc66933 100644 --- a/unix/zsyscall_linux_arm64.go +++ b/unix/zsyscall_linux_arm64.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_mips.go b/unix/zsyscall_linux_mips.go index f69db5fa..e563565d 100644 --- a/unix/zsyscall_linux_mips.go +++ b/unix/zsyscall_linux_mips.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_mips64.go b/unix/zsyscall_linux_mips64.go index b584866d..1ee4a5e4 100644 --- a/unix/zsyscall_linux_mips64.go +++ b/unix/zsyscall_linux_mips64.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_mips64le.go b/unix/zsyscall_linux_mips64le.go index 90319480..80506f59 100644 --- a/unix/zsyscall_linux_mips64le.go +++ b/unix/zsyscall_linux_mips64le.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_mipsle.go b/unix/zsyscall_linux_mipsle.go index 42c5ab6a..0a412e1b 100644 --- a/unix/zsyscall_linux_mipsle.go +++ b/unix/zsyscall_linux_mipsle.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_ppc64.go b/unix/zsyscall_linux_ppc64.go index 8a4cf63e..c9751d25 100644 --- a/unix/zsyscall_linux_ppc64.go +++ b/unix/zsyscall_linux_ppc64.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_ppc64le.go b/unix/zsyscall_linux_ppc64le.go index c7035f23..3848a49c 100644 --- a/unix/zsyscall_linux_ppc64le.go +++ b/unix/zsyscall_linux_ppc64le.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return diff --git a/unix/zsyscall_linux_s390x.go b/unix/zsyscall_linux_s390x.go index 99acf2a5..1e16935d 100644 --- a/unix/zsyscall_linux_s390x.go +++ b/unix/zsyscall_linux_s390x.go @@ -511,6 +511,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) return