mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
c7ccbddf22
commit
856238615d
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue