mirror of
https://github.com/ceph/go-ceph
synced 2024-12-13 18:06:19 +00:00
780f7014a2
Since Go 1.21 there is a runtime.Pinner API that allows to safely pass structures with embedded Go pointers to C code. In earlier Go version we know that the garbage collector is non-moving, so it is safe to pass Go pointers to C as well. This change adds two implementations of PtrGuard, one for pre 1.21 that is basically a no-op, and one for 1.21+ that uses runtime.Pinner. Signed-off-by: Sven Anderson <sven@redhat.com> |
||
---|---|---|
.. | ||
admintest | ||
callbacks | ||
commands | ||
cutil | ||
errutil | ||
log | ||
retry | ||
timespec | ||
util |