Skip to content

Commit

Permalink
internal/poll,syscall: drop the fallback for accept4 on linux/arm
Browse files Browse the repository at this point in the history
For #67001

Change-Id: Ic0b91cd393046c53e41908e8dbbe2ab5fb6b8a74
Reviewed-on: https://go-review.googlesource.com/c/go/+/588216
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
Auto-Submit: Tobias Klauser <[email protected]>
  • Loading branch information
panjf2000 authored and gopherbot committed Aug 7, 2024
1 parent 80746f7 commit 5192d41
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 124 deletions.
2 changes: 1 addition & 1 deletion src/internal/poll/sock_cloexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// This file implements accept for platforms that provide a fast path for
// setting SetNonblock and CloseOnExec.

//go:build dragonfly || freebsd || (linux && !arm) || netbsd || openbsd
//go:build dragonfly || freebsd || linux || netbsd || openbsd

package poll

Expand Down
51 changes: 0 additions & 51 deletions src/internal/poll/sock_cloexec_accept.go

This file was deleted.

2 changes: 1 addition & 1 deletion src/syscall/mkall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ linux_amd64)
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_arm)
GOOSARCH_in="syscall_linux_arm.go syscall_linux_accept.go"
GOOSARCH_in="syscall_linux_arm.go"
mkerrors="$mkerrors"
mksyscall="./mksyscall.pl -l32 -arm"
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
Expand Down
4 changes: 4 additions & 0 deletions src/syscall/syscall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
return nil, EAFNOSUPPORT
}

func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return Accept4(fd, 0)
}

func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
Expand Down
34 changes: 0 additions & 34 deletions src/syscall/syscall_linux_accept.go

This file was deleted.

25 changes: 0 additions & 25 deletions src/syscall/syscall_linux_accept4.go

This file was deleted.

13 changes: 1 addition & 12 deletions src/syscall/zsyscall_linux_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5192d41

Please sign in to comment.