diff options
| author | qmuntal <quimmuntal@gmail.com> | 2026-03-05 10:07:49 +0100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-18 15:32:53 -0700 |
| commit | 6bdfdb5f51951584732e6a95a7ee8a5ba5e8cb93 (patch) | |
| tree | 5de5bf3d98eda9a353de1028b9e0836adb77ea2f /src/runtime/os_aix.go | |
| parent | 8e137ff9953d7a535170c9f3ff2c55811e7e13c3 (diff) | |
| download | go-6bdfdb5f51951584732e6a95a7ee8a5ba5e8cb93.tar.xz | |
runtime: implement part of library initialization in Go
All architectures supporting c-shared and c-archive share the same
initialization code in assembly, and most of it can be implemented in
pure Go.
Cq-Include-Trybots: luci.golang.try:gotip-darwin-arm64-longtest,gotip-linux-ppc64le_power10,gotip-linux-riscv64,gotip-linux-loong64,gotip-linux-s390x
Change-Id: Iaa9fb7d6f9ca8785f1098461646d607ef6b00d47
Reviewed-on: https://go-review.googlesource.com/c/go/+/706417
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'src/runtime/os_aix.go')
| -rw-r--r-- | src/runtime/os_aix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/os_aix.go b/src/runtime/os_aix.go index 4bb8576f42..7a667c2419 100644 --- a/src/runtime/os_aix.go +++ b/src/runtime/os_aix.go @@ -112,7 +112,7 @@ func getCPUCount() int32 { // This function is not safe to use after initialization as it does not pass an M as fnarg. // //go:nosplit -func newosproc0(stacksize uintptr, fn *funcDescriptor) { +func newosproc0(stacksize uintptr, fn unsafe.Pointer) { var ( attr pthread_attr oset sigset @@ -226,7 +226,7 @@ func newosproc(mp *m) { // with signals disabled. It will enable them in minit. sigprocmask(_SIG_SETMASK, &sigset_all, &oset) ret := retryOnEAGAIN(func() int32 { - return pthread_create(&tid, &attr, &tstart, unsafe.Pointer(mp)) + return pthread_create(&tid, &attr, unsafe.Pointer(&tstart), unsafe.Pointer(mp)) }) sigprocmask(_SIG_SETMASK, &oset, nil) if ret != 0 { |
