]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: rewrite pointer passing rules in terms of pinning
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 24 May 2023 19:53:14 +0000 (19:53 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 30 May 2023 19:54:37 +0000 (19:54 +0000)
commit8c5d1a41ad53d9a24885c760cca9002275807d48
treec558d973365aeadc057ba3db33616f3aac0a12a5
parent348fd6389b8a1245f8ec67d4cbd904c5b4ab2db5
cmd/cgo: rewrite pointer passing rules in terms of pinning

With the introduction of runtime.Pinner, we need to update the cgo
pointer passing rules to accomodate the new functionality. These rule
changes are easier to describe if the rest of the pointer passing rules
are described in terms of pinning as well (Go memory is implicitly
pinned when a pointer to it is passed to a C function, and implicitly
unpinned when that function returns).

For #46787.

Change-Id: I263f03412bc9165f19c9ada72fb005ed0483a8ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/498116
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
src/cmd/cgo/doc.go