runtime: amend doc for setPinned

Change-Id: I9c5a8f8a031e368bda312c830dc266f5986e8b1a
GitHub-Last-Rev: 23145e8fdb
GitHub-Pull-Request: golang/go#76160
Reviewed-on: https://go-review.googlesource.com/c/go/+/717341
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Jes Cok 2025-11-03 18:47:25 +00:00 committed by Gopher Robot
parent c7ccbddf22
commit 856238615d

View file

@ -143,8 +143,8 @@ func isPinned(ptr unsafe.Pointer) bool {
} }
// setPinned marks or unmarks a Go pointer as pinned, when the ptr is a Go pointer. // setPinned marks or unmarks a Go pointer as pinned, when the ptr is a Go pointer.
// It will be ignored while try to pin a non-Go pointer, // It will be ignored while trying to pin a non-Go pointer.
// and it will be panic while try to unpin a non-Go pointer, // It will panic while trying to unpin a non-Go pointer,
// which should not happen in normal usage. // which should not happen in normal usage.
func setPinned(ptr unsafe.Pointer, pin bool) bool { func setPinned(ptr unsafe.Pointer, pin bool) bool {
span := spanOfHeap(uintptr(ptr)) span := spanOfHeap(uintptr(ptr))