aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2025-09-25 10:12:12 -0700
committerGopher Robot <gobot@golang.org>2025-09-25 10:29:41 -0700
commitd70ad4e740e24b4b76961c4b56d698fa23668aa2 (patch)
tree8675569ceb2c8d91187724d131ae768f9ed5a89f /src/sync
parentd7abfe4f0dc91568648a66495b9f5d7ebc0f22b5 (diff)
downloadgo-d70ad4e740e24b4b76961c4b56d698fa23668aa2.tar.xz
sync/atomic: correct Uintptr.Or return doc
Uintptr.Or returns the old value, just like all of the other Or functions. This was a typo in the original CL 544455. Fixes #75607. Change-Id: I260959e7e32e51f1152b5271df6cc51adfa02a4d Reviewed-on: https://go-review.googlesource.com/c/go/+/706816 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/atomic/type.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sync/atomic/type.go b/src/sync/atomic/type.go
index 40a29fed8c..4a74150b41 100644
--- a/src/sync/atomic/type.go
+++ b/src/sync/atomic/type.go
@@ -232,7 +232,7 @@ func (x *Uintptr) Add(delta uintptr) (new uintptr) { return AddUintptr(&x.v, del
func (x *Uintptr) And(mask uintptr) (old uintptr) { return AndUintptr(&x.v, mask) }
// Or atomically performs a bitwise OR operation on x using the bitmask
-// provided as mask and returns the updated value after the OR operation.
+// provided as mask and returns the old value.
func (x *Uintptr) Or(mask uintptr) (old uintptr) { return OrUintptr(&x.v, mask) }
// noCopy may be added to structs which must not be copied