...

Source file src/runtime/sys_openbsd1.go

Documentation: runtime

		 1  // Copyright 2020 The Go Authors. All rights reserved.
		 2  // Use of this source code is governed by a BSD-style
		 3  // license that can be found in the LICENSE file.
		 4  
		 5  //go:build openbsd
		 6  // +build openbsd
		 7  
		 8  package runtime
		 9  
		10  import "unsafe"
		11  
		12  //go:nosplit
		13  //go:cgo_unsafe_args
		14  func thrsleep(ident uintptr, clock_id int32, tsp *timespec, lock uintptr, abort *uint32) int32 {
		15  	ret := libcCall(unsafe.Pointer(funcPC(thrsleep_trampoline)), unsafe.Pointer(&ident))
		16  	KeepAlive(tsp)
		17  	KeepAlive(abort)
		18  	return ret
		19  }
		20  func thrsleep_trampoline()
		21  
		22  //go:nosplit
		23  //go:cgo_unsafe_args
		24  func thrwakeup(ident uintptr, n int32) int32 {
		25  	return libcCall(unsafe.Pointer(funcPC(thrwakeup_trampoline)), unsafe.Pointer(&ident))
		26  }
		27  func thrwakeup_trampoline()
		28  
		29  //go:nosplit
		30  func osyield() {
		31  	libcCall(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil))
		32  }
		33  func sched_yield_trampoline()
		34  
		35  //go:nosplit
		36  func osyield_no_g() {
		37  	asmcgocall_no_g(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil))
		38  }
		39  
		40  //go:cgo_import_dynamic libc_thrsleep __thrsleep "libc.so"
		41  //go:cgo_import_dynamic libc_thrwakeup __thrwakeup "libc.so"
		42  //go:cgo_import_dynamic libc_sched_yield sched_yield "libc.so"
		43  
		44  //go:cgo_import_dynamic _ _ "libc.so"
		45  

View as plain text