aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/internal
diff options
context:
space:
mode:
authorAndy Pan <panjf2000@gmail.com>2024-02-16 14:32:27 +0800
committerGopher Robot <gobot@golang.org>2024-02-20 14:59:53 +0000
commita3c35430fc0a67b5c8af6d57d21e2881929076ac (patch)
tree3152d382f5718c910219a41aa4002f7adcbc8497 /src/runtime/internal
parentd068c2cb620c1daeedc8b9cce488af45a6c2c889 (diff)
downloadgo-a3c35430fc0a67b5c8af6d57d21e2881929076ac.tar.xz
runtime/internal/syscall: merge duplicate constants
Change-Id: Ifdc6e22d52317cdb90a607ac4d72437d4d6b33e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/564716 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/runtime/internal')
-rw-r--r--src/runtime/internal/syscall/defs_linux.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_386.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_amd64.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_arm.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_arm64.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_loong64.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_mips64x.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_mipsx.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_ppc64x.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_riscv64.go12
-rw-r--r--src/runtime/internal/syscall/defs_linux_s390x.go12
11 files changed, 21 insertions, 111 deletions
diff --git a/src/runtime/internal/syscall/defs_linux.go b/src/runtime/internal/syscall/defs_linux.go
index 242a67b4bc..b2e36a244f 100644
--- a/src/runtime/internal/syscall/defs_linux.go
+++ b/src/runtime/internal/syscall/defs_linux.go
@@ -5,5 +5,15 @@
package syscall
const (
- EFD_CLOEXEC = 0x80000
+ EPOLLIN = 0x1
+ EPOLLOUT = 0x4
+ EPOLLERR = 0x8
+ EPOLLHUP = 0x10
+ EPOLLRDHUP = 0x2000
+ EPOLLET = 0x80000000
+ EPOLL_CLOEXEC = 0x80000
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ EFD_CLOEXEC = 0x80000
)
diff --git a/src/runtime/internal/syscall/defs_linux_386.go b/src/runtime/internal/syscall/defs_linux_386.go
index fa0ca5ed0a..613dc77d59 100644
--- a/src/runtime/internal/syscall/defs_linux_386.go
+++ b/src/runtime/internal/syscall/defs_linux_386.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 328
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_amd64.go b/src/runtime/internal/syscall/defs_linux_amd64.go
index 71bd906ed4..2ba3128813 100644
--- a/src/runtime/internal/syscall/defs_linux_amd64.go
+++ b/src/runtime/internal/syscall/defs_linux_amd64.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 290
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_arm.go b/src/runtime/internal/syscall/defs_linux_arm.go
index 146cda5fcb..af3e0510b1 100644
--- a/src/runtime/internal/syscall/defs_linux_arm.go
+++ b/src/runtime/internal/syscall/defs_linux_arm.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 356
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_arm64.go b/src/runtime/internal/syscall/defs_linux_arm64.go
index 0500b317e9..c924f6211a 100644
--- a/src/runtime/internal/syscall/defs_linux_arm64.go
+++ b/src/runtime/internal/syscall/defs_linux_arm64.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 19
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_loong64.go b/src/runtime/internal/syscall/defs_linux_loong64.go
index 2c67b7b568..c1a5649a42 100644
--- a/src/runtime/internal/syscall/defs_linux_loong64.go
+++ b/src/runtime/internal/syscall/defs_linux_loong64.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 19
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_mips64x.go b/src/runtime/internal/syscall/defs_linux_mips64x.go
index 3031af241b..07c0aba539 100644
--- a/src/runtime/internal/syscall/defs_linux_mips64x.go
+++ b/src/runtime/internal/syscall/defs_linux_mips64x.go
@@ -14,17 +14,7 @@ const (
SYS_EPOLL_PWAIT2 = 5441
SYS_EVENTFD2 = 5284
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x80
+ EFD_NONBLOCK = 0x80
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_mipsx.go b/src/runtime/internal/syscall/defs_linux_mipsx.go
index 4d51921abd..a1bb5d720a 100644
--- a/src/runtime/internal/syscall/defs_linux_mipsx.go
+++ b/src/runtime/internal/syscall/defs_linux_mipsx.go
@@ -14,17 +14,7 @@ const (
SYS_EPOLL_PWAIT2 = 4441
SYS_EVENTFD2 = 4325
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x80
+ EFD_NONBLOCK = 0x80
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_ppc64x.go b/src/runtime/internal/syscall/defs_linux_ppc64x.go
index fcd15e60a2..78558b360f 100644
--- a/src/runtime/internal/syscall/defs_linux_ppc64x.go
+++ b/src/runtime/internal/syscall/defs_linux_ppc64x.go
@@ -14,17 +14,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 314
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_riscv64.go b/src/runtime/internal/syscall/defs_linux_riscv64.go
index 2c67b7b568..c1a5649a42 100644
--- a/src/runtime/internal/syscall/defs_linux_riscv64.go
+++ b/src/runtime/internal/syscall/defs_linux_riscv64.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 19
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {
diff --git a/src/runtime/internal/syscall/defs_linux_s390x.go b/src/runtime/internal/syscall/defs_linux_s390x.go
index c1deed6c74..b539b2d22a 100644
--- a/src/runtime/internal/syscall/defs_linux_s390x.go
+++ b/src/runtime/internal/syscall/defs_linux_s390x.go
@@ -12,17 +12,7 @@ const (
SYS_EPOLL_PWAIT2 = 441
SYS_EVENTFD2 = 323
- EPOLLIN = 0x1
- EPOLLOUT = 0x4
- EPOLLERR = 0x8
- EPOLLHUP = 0x10
- EPOLLRDHUP = 0x2000
- EPOLLET = 0x80000000
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EFD_NONBLOCK = 0x800
+ EFD_NONBLOCK = 0x800
)
type EpollEvent struct {