aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_ppc64x.s
diff options
context:
space:
mode:
authorAndrew Pogrebnoy <absourd.noise@gmail.com>2022-08-01 17:58:17 +0300
committerGopher Robot <gobot@golang.org>2022-09-30 17:35:24 +0000
commit4e6f963469d8f489586b2bf277af30e0fbfa1679 (patch)
tree78a0af19244b856a0845b997d72324f16b6d0457 /src/runtime/sys_linux_ppc64x.s
parent9e0149da3c25c3a2399e0f578549f252c186491c (diff)
downloadgo-4e6f963469d8f489586b2bf277af30e0fbfa1679.tar.xz
runtime: move epoll syscalls to runtime/internal/syscall
This change moves Linux epoll's syscalls implementation to the "runtime/internal/syscall" package. The intention in this CL was to minimise behavioural changes but make the code more generalised. This also will allow adding new syscalls (like epoll_pwait2) without the need to implement assembly stubs for each arch. It also drops epoll_create as not all architectures provide this call. epoll_create1 was added to the kernel in version 2.6.27 and Go requires Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to always use epoll_create1. For #53824 For #51087 Change-Id: I9a6a26b7f2075a38e041de1bab4691da0ecb94fc Reviewed-on: https://go-review.googlesource.com/c/go/+/421994 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
-rw-r--r--src/runtime/sys_linux_ppc64x.s54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s
index 2913a05f56..853008d5fe 100644
--- a/src/runtime/sys_linux_ppc64x.s
+++ b/src/runtime/sys_linux_ppc64x.s
@@ -21,7 +21,6 @@
#define SYS_getpid 20
#define SYS_kill 37
#define SYS_brk 45
-#define SYS_fcntl 55
#define SYS_mmap 90
#define SYS_munmap 91
#define SYS_setitimer 104
@@ -38,15 +37,11 @@
#define SYS_futex 221
#define SYS_sched_getaffinity 223
#define SYS_exit_group 234
-#define SYS_epoll_create 236
-#define SYS_epoll_ctl 237
-#define SYS_epoll_wait 238
#define SYS_timer_create 240
#define SYS_timer_settime 241
#define SYS_timer_delete 244
#define SYS_clock_gettime 246
#define SYS_tgkill 250
-#define SYS_epoll_create1 315
#define SYS_pipe2 317
TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0-4
@@ -876,55 +871,6 @@ TEXT runtime·sched_getaffinity(SB),NOSPLIT|NOFRAME,$0
MOVW R3, ret+24(FP)
RET
-// int32 runtime·epollcreate(int32 size);
-TEXT runtime·epollcreate(SB),NOSPLIT|NOFRAME,$0
- MOVW size+0(FP), R3
- SYSCALL $SYS_epoll_create
- BVC 2(PC)
- NEG R3 // caller expects negative errno
- MOVW R3, ret+8(FP)
- RET
-
-// int32 runtime·epollcreate1(int32 flags);
-TEXT runtime·epollcreate1(SB),NOSPLIT|NOFRAME,$0
- MOVW flags+0(FP), R3
- SYSCALL $SYS_epoll_create1
- BVC 2(PC)
- NEG R3 // caller expects negative errno
- MOVW R3, ret+8(FP)
- RET
-
-// func epollctl(epfd, op, fd int32, ev *epollEvent) int
-TEXT runtime·epollctl(SB),NOSPLIT|NOFRAME,$0
- MOVW epfd+0(FP), R3
- MOVW op+4(FP), R4
- MOVW fd+8(FP), R5
- MOVD ev+16(FP), R6
- SYSCALL $SYS_epoll_ctl
- NEG R3 // caller expects negative errno
- MOVW R3, ret+24(FP)
- RET
-
-// int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout);
-TEXT runtime·epollwait(SB),NOSPLIT|NOFRAME,$0
- MOVW epfd+0(FP), R3
- MOVD ev+8(FP), R4
- MOVW nev+16(FP), R5
- MOVW timeout+20(FP), R6
- SYSCALL $SYS_epoll_wait
- BVC 2(PC)
- NEG R3 // caller expects negative errno
- MOVW R3, ret+24(FP)
- RET
-
-// void runtime·closeonexec(int32 fd);
-TEXT runtime·closeonexec(SB),NOSPLIT|NOFRAME,$0
- MOVW fd+0(FP), R3 // fd
- MOVD $2, R4 // F_SETFD
- MOVD $1, R5 // FD_CLOEXEC
- SYSCALL $SYS_fcntl
- RET
-
// func sbrk0() uintptr
TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0
// Implemented as brk(NULL).