A benchmark on the trivial cgo call, to assess overhead of different
ways of calling out to cgo.
This commit is contained in:
@@ -381,3 +381,8 @@ func xfer_callback(cptr unsafe.Pointer) {
|
||||
ch := *(*chan struct{})(cptr)
|
||||
close(ch)
|
||||
}
|
||||
|
||||
// for benchmarking
|
||||
func libusbSetDebug(c *libusbContext, lvl int) {
|
||||
C.libusb_set_debug((*C.libusb_context)(c), C.int(lvl))
|
||||
}
|
||||
|
Reference in New Issue
Block a user