aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_amd64.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-08-09 10:20:22 +0200
committerGopher Robot <gobot@golang.org>2022-08-18 16:08:26 +0000
commit021fd86ce12ac694db778f6998d12c1e8d8c63ca (patch)
tree50816a22bc965b2147917522f560e19c674b3091 /src/syscall/syscall_linux_amd64.go
parent741ab7e819538ef84ce7a2e560730c6212e95161 (diff)
downloadgo-021fd86ce12ac694db778f6998d12c1e8d8c63ca.tar.xz
syscall: implement EpollCreate using EpollCreate1 on all linux platforms
Most newer architectures (e.g. arm64, riscv64, loong64) don't provide the epoll_create syscall. Some systems (e.g. Android) block it even if it were available. In the kernel, the epoll_create syscall is implemented [1] the same way EpollCreate is implemented in this package for platforms without the epoll_create syscall. The epoll_create1 syscall is available since Linux kernel 2.6.27 and the minimum required kernel version is 2.6.32 since Go 1.18 (see #45964). Thus, avoid the separate wrapper and consistently implement EpollCreate using EpollCreate1. [1] https://elixir.bootlin.com/linux/v5.15-rc1/source/fs/eventpoll.c#L2006 The same change was already done in CL 349809 for golang.org/x/sys/unix. For #45964 Change-Id: I5463b208aa7ae236fa2c175d6d3ec6568f1840b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/411594 Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/syscall/syscall_linux_amd64.go')
-rw-r--r--src/syscall/syscall_linux_amd64.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/syscall/syscall_linux_amd64.go b/src/syscall/syscall_linux_amd64.go
index 0bcc664d32..229cf1ccf5 100644
--- a/src/syscall/syscall_linux_amd64.go
+++ b/src/syscall/syscall_linux_amd64.go
@@ -7,7 +7,6 @@ package syscall
const _SYS_setgroups = SYS_SETGROUPS
//sys Dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatfs(fd int, buf *Statfs_t) (err error)