]> Cypherpunks repositories - gostls13.git/commit
runtime/internal/atomic: add generic implementation for And/Or
authorMauri de Souza Meneguzzo <mauri870@gmail.com>
Sat, 18 Nov 2023 17:52:22 +0000 (17:52 +0000)
committerCherry Mui <cherryyz@google.com>
Mon, 20 Nov 2023 02:02:59 +0000 (02:02 +0000)
commit237715cf7c4c2aabf6d3c04473488c1b2477f8ea
treea2d649b06b14fe0ff0be8868f850169964fbfda0
parent6382893890b82bbc0439eade5b132d9d1b3fb3a7
runtime/internal/atomic: add generic implementation for And/Or

Without having all the architectures implementing the And/Or operators
merged I can't proceed with the public sync/atomic apis. This CL adds a
generic implementation that should work for all the remaining arches,
while waiting for the native assembly implementations in CL 531835,
CL 531678, CL 531895.

I regret the oversight of not pushing this earlier.

For #61395

Change-Id: Ib2d67f359fe324b4743eb79e9c8e52e8f6f5476c
GitHub-Last-Rev: d350927ba1c51d1f708be2f2904f826fdb79b8cd
GitHub-Pull-Request: golang/go#64214
Reviewed-on: https://go-review.googlesource.com/c/go/+/543175
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/runtime/internal/atomic/atomic_andor_generic.go [new file with mode: 0644]
src/runtime/internal/atomic/atomic_andor_test.go