github.com/Code-Hex/battery@v1.0.0/internal/macos/abi.go (about)

     1  //go:build darwin
     2  
     3  package macOS
     4  
     5  import (
     6  	"unsafe"
     7  	_ "unsafe"
     8  )
     9  
    10  // FuncPC returns the entry point for f. See comments in runtime/proc.go
    11  // for the function of the same name.
    12  //go:nosplit
    13  func FuncPC(f func()) uintptr {
    14  	return **(**uintptr)(unsafe.Pointer(&f))
    15  }