diff options
Diffstat (limited to 'src/runtime/sys_openbsd1.go')
-rw-r--r-- | src/runtime/sys_openbsd1.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/sys_openbsd1.go b/src/runtime/sys_openbsd1.go index 4b80f60226..d852e3c58a 100644 --- a/src/runtime/sys_openbsd1.go +++ b/src/runtime/sys_openbsd1.go @@ -14,7 +14,10 @@ import ( //go:nosplit //go:cgo_unsafe_args func thrsleep(ident uintptr, clock_id int32, tsp *timespec, lock uintptr, abort *uint32) int32 { - return libcCall(unsafe.Pointer(abi.FuncPCABI0(thrsleep_trampoline)), unsafe.Pointer(&ident)) + ret := libcCall(unsafe.Pointer(abi.FuncPCABI0(thrsleep_trampoline)), unsafe.Pointer(&ident)) + KeepAlive(tsp) + KeepAlive(abort) + return ret } func thrsleep_trampoline() |