[go] runtime/cgo: deduplicate pthreads-related functions

0 views
Skip to first unread message

Quim Muntal (Gerrit)

unread,
Feb 13, 2026, 11:07:17 AMFeb 13
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Go LUCI, Michael Pratt, Ian Lance Taylor, Keith Randall, golang-co...@googlegroups.com

Quim Muntal submitted the change

Change information

Commit message:
runtime/cgo: deduplicate pthreads-related functions

Almost all pthread-related functions are exactly the same for Unix OSes.
Their implementation can be shared, taking into account the small
differences using standard predefined macros.
Cq-Include-Trybots: luci.golang.try:gotip-freebsd-amd64,gotip-darwin-amd64_14,gotip-darwin-arm64_15,gotip-netbsd-arm64,gotip-openbsd-amd64,gotip-openbsd-ppc64,gotip-solaris-amd64,gotip-linux-ppc64_power10
Change-Id: I8bee25f0619a5b315439cf12d94312c36c3e5a73
Reviewed-by: Michael Pratt <mpr...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Files:
  • M src/runtime/cgo/gcc_darwin_amd64.c
  • M src/runtime/cgo/gcc_darwin_arm64.c
  • M src/runtime/cgo/gcc_dragonfly_amd64.c
  • M src/runtime/cgo/gcc_fatalf.c
  • M src/runtime/cgo/gcc_freebsd.c
  • M src/runtime/cgo/gcc_freebsd_amd64.c
  • M src/runtime/cgo/gcc_libinit.c
  • M src/runtime/cgo/gcc_libinit_windows.c
  • M src/runtime/cgo/gcc_linux.c
  • M src/runtime/cgo/gcc_linux_amd64.c
  • M src/runtime/cgo/gcc_linux_arm64.c
  • M src/runtime/cgo/gcc_linux_s390x.c
  • M src/runtime/cgo/gcc_netbsd.c
  • M src/runtime/cgo/gcc_openbsd.c
  • M src/runtime/cgo/gcc_ppc64x.c
  • M src/runtime/cgo/gcc_solaris_amd64.c
  • D src/runtime/cgo/gcc_stack_darwin.c
  • D src/runtime/cgo/gcc_stack_unix.c
  • D src/runtime/cgo/gcc_stack_windows.c
  • M src/runtime/cgo/libcgo_unix.h
  • A src/runtime/cgo/pthread_unix.c
Change size: L
Delta: 21 files changed, 158 insertions(+), 539 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Michael Pratt, +2 by Cherry Mui
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I8bee25f0619a5b315439cf12d94312c36c3e5a73
Gerrit-Change-Number: 707955
Gerrit-PatchSet: 20
Gerrit-Owner: Quim Muntal <quimm...@gmail.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages