Source file src/runtime/cgo/cgo_unix_nonaix.go

     1  // Copyright 2026 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 goexperiment.runtimecgopurego && !msan && !tsan && unix && !aix
     6  
     7  package cgo
     8  
     9  import (
    10  	"internal/abi"
    11  	"unsafe"
    12  )
    13  
    14  // cgoCallTrampoline, pthreadKeyDestructor, and x_cgo_threadentry are C-callable
    15  // assembly entrypoints.
    16  func cgoCallTrampoline()
    17  func pthreadKeyDestructor()
    18  func x_cgo_threadentry()
    19  
    20  //go:nosplit
    21  //go:norace
    22  func cgoCallTrampolinePC() unsafe.Pointer {
    23  	return unsafe.Pointer(abi.FuncPCABI0(cgoCallTrampoline))
    24  }
    25  
    26  //go:nosplit
    27  //go:norace
    28  func pthreadKeyDestructorPC() uintptr {
    29  	return abi.FuncPCABI0(pthreadKeyDestructor)
    30  }
    31  
    32  //go:nosplit
    33  //go:norace
    34  func threadentryPC() uintptr {
    35  	return abi.FuncPCABI0(x_cgo_threadentry)
    36  }
    37  

View as plain text