New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync/atomic: FreeBSD/ARM Load* Store* implementations missing memory barriers #23778
Comments
CC @cherrymui |
I'm probably missing something, but why do we have so many (I understand why we have one for Linux — because it provides a built-in implementation — but why shouldn't the fallback implementation be the same for every other OS?) |
@bcmills The fallback implementation is the same for all the other OSes. |
Change https://golang.org/cl/93615 mentions this issue: |
That seems to be true for most of the functions, but not go/src/sync/atomic/asm_freebsd_arm.s Lines 58 to 66 in 04e6ae6
...or am I missing something more subtle to it? |
Change https://golang.org/cl/93635 mentions this issue: |
Change https://golang.org/cl/93637 mentions this issue: |
@bcmills Sorry, you are right. I was looking at |
@bcmills I don't see a good reason not to unify those. |
Updates #23778. Change-Id: I80e57a15b6e3bbc2e25ea186399ff0e360fc5c21 Reviewed-on: https://go-review.googlesource.com/93635 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
go/src/sync/atomic/asm_freebsd_arm.s
Lines 58 to 66 in 829b64c
The runtime/internal/atomic version is using memory barriers correctly in the underlying armcas:
go/src/runtime/internal/atomic/asm_arm.s
Lines 21 to 50 in 829b64c
The text was updated successfully, but these errors were encountered: