github.com/moontrade/mdbx-go@v0.4.0/internal/unsafecgo/call_libfuzzer.go (about) 1 //go:build libfuzzer && (amd64 || arm64) 2 // +build libfuzzer 3 // +build amd64 arm64 4 5 package unsafecgo 6 7 import _ "unsafe" 8 9 // NonBlocking C function fn without going all the way through cgo. 10 // Example: NonBlocking((*byte)(C.my_c_func), 0, 0) 11 // void my_c_func(size_t arg0, size_t arg1) { 12 // } 13 //go:noescape 14 //go:nosplit 15 //go:linkname NonBlocking runtime.libfuzzerCall 16 func NonBlocking(fn *byte, arg0, arg1 uintptr) 17 18 func Blocking(fn *byte, arg0, arg1 uintptr) { 19 cgo.Call(fn, arg0, arg1) 20 }