Skip to content

Commit d70ad4e

Browse files
prattmicgopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Michael Pratt <[email protected]>
1 parent d7abfe4 commit d70ad4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync/atomic/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (x *Uintptr) Add(delta uintptr) (new uintptr) { return AddUintptr(&x.v, del
232232
func (x *Uintptr) And(mask uintptr) (old uintptr) { return AndUintptr(&x.v, mask) }
233233

234234
// Or atomically performs a bitwise OR operation on x using the bitmask
235-
// provided as mask and returns the updated value after the OR operation.
235+
// provided as mask and returns the old value.
236236
func (x *Uintptr) Or(mask uintptr) (old uintptr) { return OrUintptr(&x.v, mask) }
237237

238238
// noCopy may be added to structs which must not be copied

0 commit comments

Comments
 (0)