]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: amend doc for setPinned
authorJes Cok <xigua67damn@gmail.com>
Mon, 3 Nov 2025 18:47:25 +0000 (18:47 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 4 Nov 2025 20:46:24 +0000 (12:46 -0800)
Change-Id: I9c5a8f8a031e368bda312c830dc266f5986e8b1a
GitHub-Last-Rev: 23145e8fdbc020ae17503e3abe4fe230ba1082ef
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>
src/runtime/pinner.go

index 424dd065efd57766aade1b3eb4b1702f3b768165..dad14a4d09c5e394c3953ba955bc64218cc813b9 100644 (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.
-// It will be ignored while try to pin a non-Go pointer,
-// and it will be panic while try to unpin a non-Go pointer,
+// It will be ignored while trying to pin a non-Go pointer.
+// It will panic while trying to unpin a non-Go pointer,
 // which should not happen in normal usage.
 func setPinned(ptr unsafe.Pointer, pin bool) bool {
        span := spanOfHeap(uintptr(ptr))