Black Lives Matter. Support the Equal Justice Initiative.

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 && !mips64
     6  // +build openbsd,!mips64
     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  	return libcCall(unsafe.Pointer(funcPC(thrsleep_trampoline)), unsafe.Pointer(&ident))
    16  }
    17  func thrsleep_trampoline()
    18  
    19  //go:nosplit
    20  //go:cgo_unsafe_args
    21  func thrwakeup(ident uintptr, n int32) int32 {
    22  	return libcCall(unsafe.Pointer(funcPC(thrwakeup_trampoline)), unsafe.Pointer(&ident))
    23  }
    24  func thrwakeup_trampoline()
    25  
    26  //go:nosplit
    27  func osyield() {
    28  	libcCall(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil))
    29  }
    30  func sched_yield_trampoline()
    31  
    32  //go:nosplit
    33  func osyield_no_g() {
    34  	asmcgocall_no_g(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil))
    35  }
    36  
    37  //go:cgo_import_dynamic libc_thrsleep __thrsleep "libc.so"
    38  //go:cgo_import_dynamic libc_thrwakeup __thrwakeup "libc.so"
    39  //go:cgo_import_dynamic libc_sched_yield sched_yield "libc.so"
    40  
    41  //go:cgo_import_dynamic _ _ "libc.so"
    42  

View as plain text