From: Michael Pratt Date: Thu, 25 Sep 2025 17:12:12 +0000 (-0700) Subject: sync/atomic: correct Uintptr.Or return doc X-Git-Tag: go1.26rc1~784 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d70ad4e740;p=gostls13.git 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 Reviewed-by: Mauri de Souza Meneguzzo LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Pratt --- 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