go/src/runtime/cgo
Tobias Klauser 7f71e1fc28 runtime/cgo: remove memset in _cgo_sys_thread_start on linux
pthread_attr_init in glibc and musl libc already explicitly clear the
pthread_attr argument before setting it, see
https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_attr_init.c
and https://git.musl-libc.org/cgit/musl/log/src/thread/pthread_attr_init.c

It looks like pthread_attr_init has been implemented like this for a
long time in both libcs. The comment and memset in _cgo_sys_thread_start
probably stem from a time where not all libcs did the explicit memset in
pthread_attr_init.

Also, the memset in _cgo_sys_thread_start is not performed on all linux
platforms further indicating that this isn't an issue anymore.

Change-Id: I920148b5d24751195ced7af5bb7c52a7f8293259
Reviewed-on: https://go-review.googlesource.com/c/go/+/404275
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-05-06 15:32:04 +00:00
..
abi_amd64.h runtime: unify C->Go ABI transitions 2021-04-15 12:38:13 +00:00
abi_arm64.h runtime: unify C->Go ABI transitions on arm64 2022-03-30 01:28:43 +00:00
asm_386.s
asm_amd64.s runtime: unify C->Go ABI transitions 2021-04-15 12:38:13 +00:00
asm_arm.s
asm_arm64.s runtime: unify C->Go ABI transitions on arm64 2022-03-30 01:28:43 +00:00
asm_mips64x.s all: add //go:build lines to assembly files 2021-05-13 09:12:17 +00:00
asm_mipsx.s all: add //go:build lines to assembly files 2021-05-13 09:12:17 +00:00
asm_ppc64x.s runtime/cgo: fix crosscall2 on ppc64x 2021-05-17 15:57:52 +00:00
asm_riscv64.s cmd/asm,cmd/compile,runtime: stop using X3 (aka GP) on riscv64 2021-11-03 09:08:46 +00:00
asm_s390x.s
asm_wasm.s
callbacks.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
callbacks_aix.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
callbacks_traceback.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
cgo.go internal/poll, net, syscall: use accept4 on solaris 2022-05-03 14:38:32 +00:00
dragonfly.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
freebsd.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
gcc_386.S
gcc_aix_ppc64.S
gcc_aix_ppc64.c
gcc_amd64.S runtime/cgo: fix signature of crosscall_amd64 in comment 2021-12-15 00:14:57 +00:00
gcc_android.c
gcc_arm.S
gcc_arm64.S
gcc_context.c
gcc_darwin_amd64.c
gcc_darwin_arm64.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_dragonfly_amd64.c
gcc_fatalf.c
gcc_freebsd_386.c
gcc_freebsd_amd64.c
gcc_freebsd_arm.c runtime/cgo: remove memset in _cgo_sys_thread_start on freebsd/arm 2022-03-18 06:03:19 +00:00
gcc_freebsd_arm64.c
gcc_freebsd_sigaction.c
gcc_libinit.c
gcc_libinit_windows.c
gcc_linux_386.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_amd64.c
gcc_linux_arm.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_arm64.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_mips64x.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_mipsx.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_ppc64x.S
gcc_linux_riscv64.c runtime/cgo: remove memset in _cgo_sys_thread_start on linux 2022-05-06 15:32:04 +00:00
gcc_linux_s390x.c
gcc_mips64x.S
gcc_mipsx.S
gcc_mmap.c runtime/cgo,cmd/internal/obj/ppc64: fix signals with cgo 2021-05-10 17:21:32 +00:00
gcc_netbsd_386.c
gcc_netbsd_amd64.c
gcc_netbsd_arm.c
gcc_netbsd_arm64.c
gcc_openbsd_386.c
gcc_openbsd_amd64.c
gcc_openbsd_arm.c
gcc_openbsd_arm64.c
gcc_openbsd_mips64.c cmd/dist,runtime: support cgo on openbsd/mips64 2021-04-28 12:51:42 +00:00
gcc_ppc64x.c
gcc_riscv64.S cmd/asm,cmd/compile,runtime: stop using X3 (aka GP) on riscv64 2021-11-03 09:08:46 +00:00
gcc_s390x.S
gcc_setenv.c
gcc_sigaction.c cmd/cgo, runtime/cgo: avoid GCC/clang conversion warnings 2021-09-09 22:18:05 +00:00
gcc_signal2_ios_arm64.c
gcc_signal_ios_arm64.c
gcc_signal_ios_nolldb.c
gcc_solaris_amd64.c
gcc_traceback.c runtime/cgo: when using msan explicitly unpoison cgoCallers 2021-08-09 14:48:39 +00:00
gcc_util.c
gcc_windows_386.c
gcc_windows_amd64.c
gcc_windows_arm64.c runtime: add windows/arm64 cgo-linking code 2021-04-23 21:43:07 +00:00
handle.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
handle_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
iscgo.go
libcgo.h
libcgo_unix.h
libcgo_windows.h
linux.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
linux_syscall.c
mmap.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
netbsd.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
openbsd.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
setenv.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
sigaction.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
signal_ios_arm64.go
signal_ios_arm64.s