aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_darwin_arm64.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/sys_darwin_arm64.go')
-rw-r--r--src/runtime/sys_darwin_arm64.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/sys_darwin_arm64.go b/src/runtime/sys_darwin_arm64.go
index e6d4c1be48..6170f4fdda 100644
--- a/src/runtime/sys_darwin_arm64.go
+++ b/src/runtime/sys_darwin_arm64.go
@@ -15,7 +15,9 @@ import (
//go:nosplit
//go:cgo_unsafe_args
func g0_pthread_key_create(k *pthreadkey, destructor uintptr) int32 {
- return asmcgocall(unsafe.Pointer(abi.FuncPCABI0(pthread_key_create_trampoline)), unsafe.Pointer(&k))
+ ret := asmcgocall(unsafe.Pointer(abi.FuncPCABI0(pthread_key_create_trampoline)), unsafe.Pointer(&k))
+ KeepAlive(k)
+ return ret
}
func pthread_key_create_trampoline()