]> Cypherpunks repositories - gostls13.git/commit
runtime/internal/atomic: add write barrier-enabled pointer atomics
authorRuss Cox <rsc@golang.org>
Mon, 17 Oct 2022 19:33:29 +0000 (15:33 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 18 Oct 2022 14:48:54 +0000 (14:48 +0000)
commit9fedc481ea09a0539cd2669312429ef5416a8949
treed8762969f7f124d6a38e20d22e1f759f1fab717e
parent26b48442569102226baba1d9b4a83aaee3d06611
runtime/internal/atomic: add write barrier-enabled pointer atomics

UnsafePointer.Store, UnsafePointer.CompareAndSwap were missing,
although .StoreNoWB and .CompareAndSwapNoWB existed.
Same for Pointer[T}.

Do the linkname tricks necessary to add those methods.

Change-Id: I925ee27673288accb15ebe93898f9eb01ab46a98
Reviewed-on: https://go-review.googlesource.com/c/go/+/443379
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/atomic_pointer.go
src/runtime/internal/atomic/types.go