mirror of
https://github.com/golang/go
synced 2024-11-14 18:30:31 -07:00
ffe48e00ad
These implementations will inline to the lower-level primitives, but they hide the underlying values so that all accesses are forced to use the atomic APIs. They also allow the use of shorter names (methods instead of functions) at call sites, making code more readable. Pointer[T] also avoids conversions using unsafe.Pointer at call sites. Discussed on #47141. See also https://research.swtch.com/gomm for background. Fixes #50860. Change-Id: I0b178ee0c7747fa8985f8e48cd7b01063feb7dcc Reviewed-on: https://go-review.googlesource.com/c/go/+/381317 Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
41 lines
2.3 KiB
Plaintext
41 lines
2.3 KiB
Plaintext
pkg sync/atomic, method (*Bool) CompareAndSwap(bool, bool) bool #50860
|
|
pkg sync/atomic, method (*Bool) Load() bool #50860
|
|
pkg sync/atomic, method (*Bool) Store(bool) #50860
|
|
pkg sync/atomic, method (*Bool) Swap(bool) bool #50860
|
|
pkg sync/atomic, method (*Int32) Add(int32) int32 #50860
|
|
pkg sync/atomic, method (*Int32) CompareAndSwap(int32, int32) bool #50860
|
|
pkg sync/atomic, method (*Int32) Load() int32 #50860
|
|
pkg sync/atomic, method (*Int32) Store(int32) #50860
|
|
pkg sync/atomic, method (*Int32) Swap(int32) int32 #50860
|
|
pkg sync/atomic, method (*Int64) Add(int64) int64 #50860
|
|
pkg sync/atomic, method (*Int64) CompareAndSwap(int64, int64) bool #50860
|
|
pkg sync/atomic, method (*Int64) Load() int64 #50860
|
|
pkg sync/atomic, method (*Int64) Store(int64) #50860
|
|
pkg sync/atomic, method (*Int64) Swap(int64) int64 #50860
|
|
pkg sync/atomic, method (*Pointer[$0]) CompareAndSwap(*$0, *$0) bool #50860
|
|
pkg sync/atomic, method (*Pointer[$0]) Load() *$0 #50860
|
|
pkg sync/atomic, method (*Pointer[$0]) Store(*$0) #50860
|
|
pkg sync/atomic, method (*Pointer[$0]) Swap(*$0) *$0 #50860
|
|
pkg sync/atomic, method (*Uint32) Add(uint32) uint32 #50860
|
|
pkg sync/atomic, method (*Uint32) CompareAndSwap(uint32, uint32) bool #50860
|
|
pkg sync/atomic, method (*Uint32) Load() uint32 #50860
|
|
pkg sync/atomic, method (*Uint32) Store(uint32) #50860
|
|
pkg sync/atomic, method (*Uint32) Swap(uint32) uint32 #50860
|
|
pkg sync/atomic, method (*Uint64) Add(uint64) uint64 #50860
|
|
pkg sync/atomic, method (*Uint64) CompareAndSwap(uint64, uint64) bool #50860
|
|
pkg sync/atomic, method (*Uint64) Load() uint64 #50860
|
|
pkg sync/atomic, method (*Uint64) Store(uint64) #50860
|
|
pkg sync/atomic, method (*Uint64) Swap(uint64) uint64 #50860
|
|
pkg sync/atomic, method (*Uintptr) Add(uintptr) uintptr #50860
|
|
pkg sync/atomic, method (*Uintptr) CompareAndSwap(uintptr, uintptr) bool #50860
|
|
pkg sync/atomic, method (*Uintptr) Load() uintptr #50860
|
|
pkg sync/atomic, method (*Uintptr) Store(uintptr) #50860
|
|
pkg sync/atomic, method (*Uintptr) Swap(uintptr) uintptr #50860
|
|
pkg sync/atomic, type Bool struct #50860
|
|
pkg sync/atomic, type Int32 struct #50860
|
|
pkg sync/atomic, type Int64 struct #50860
|
|
pkg sync/atomic, type Pointer[$0 interface{}] struct #50860
|
|
pkg sync/atomic, type Uint32 struct #50860
|
|
pkg sync/atomic, type Uint64 struct #50860
|
|
pkg sync/atomic, type Uintptr struct #50860
|