diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2022-08-09 10:20:22 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-08-18 16:08:26 +0000 |
| commit | 021fd86ce12ac694db778f6998d12c1e8d8c63ca (patch) | |
| tree | 50816a22bc965b2147917522f560e19c674b3091 /src/syscall/syscall_linux_mipsx.go | |
| parent | 741ab7e819538ef84ce7a2e560730c6212e95161 (diff) | |
| download | go-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_mipsx.go')
| -rw-r--r-- | src/syscall/syscall_linux_mipsx.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/syscall/syscall_linux_mipsx.go b/src/syscall/syscall_linux_mipsx.go index 5390277926..53c3a26469 100644 --- a/src/syscall/syscall_linux_mipsx.go +++ b/src/syscall/syscall_linux_mipsx.go @@ -13,7 +13,6 @@ const _SYS_setgroups = SYS_SETGROUPS func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) //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 fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 |
