Documentation
¶
Overview ¶
Package atomic provides atomic operations, independent of sync/atomic, to the runtime.
On most platforms, the compiler is aware of the functions defined in this package, and they're replaced with platform-specific intrinsics. On other platforms, generic implementations are made available.
Unless otherwise noted, operations defined in this package are sequentially consistent across threads with respect to the values they manipulate. More specifically, operations that happen in a specific order on one thread, will always be observed to happen in exactly that order by another thread.
Index ¶
- func And(ptr *uint32, val uint32)
- func And8(ptr *uint8, val uint8)
- func And32(ptr *uint32, val uint32) uint32
- func And64(ptr *uint64, val uint64) uint64
- func Anduintptr(ptr *uintptr, val uintptr) uintptr
- func Cas(ptr *uint32, old, new uint32) bool
- func Cas64(ptr *uint64, old, new uint64) bool
- func CasRel(ptr *uint32, old, new uint32) bool
- func Casint32(ptr *int32, old, new int32) bool
- func Casint64(ptr *int64, old, new int64) bool
- func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
- func Casuintptr(ptr *uintptr, old, new uintptr) bool
- func Load(ptr *uint32) uint32
- func Load8(ptr *uint8) uint8
- func Load64(ptr *uint64) uint64
- func LoadAcq(ptr *uint32) uint32
- func LoadAcq64(ptr *uint64) uint64
- func LoadAcquintptr(ptr *uintptr) uintptr
- func Loadint32(ptr *int32) int32
- func Loadint64(ptr *int64) int64
- func Loadp(ptr unsafe.Pointer) unsafe.Pointer
- func Loaduint(ptr *uint) uint
- func Loaduintptr(ptr *uintptr) uintptr
- func Or(ptr *uint32, val uint32)
- func Or8(ptr *uint8, val uint8)
- func Or32(ptr *uint32, val uint32) uint32
- func Or64(ptr *uint64, val uint64) uint64
- func Oruintptr(ptr *uintptr, val uintptr) uintptr
- func Store(ptr *uint32, val uint32)
- func Store8(ptr *uint8, val uint8)
- func Store64(ptr *uint64, val uint64)
- func StoreRel(ptr *uint32, val uint32)
- func StoreRel64(ptr *uint64, val uint64)
- func StoreReluintptr(ptr *uintptr, val uintptr)
- func Storeint32(ptr *int32, new int32)
- func Storeint64(ptr *int64, new int64)
- func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer)
- func Storeuintptr(ptr *uintptr, new uintptr)
- func Xadd(ptr *uint32, delta int32) uint32
- func Xadd64(ptr *uint64, delta int64) uint64
- func Xaddint32(ptr *int32, delta int32) int32
- func Xaddint64(ptr *int64, delta int64) int64
- func Xadduintptr(ptr *uintptr, delta uintptr) uintptr
- func Xchg(ptr *uint32, new uint32) uint32
- func Xchg8(ptr *uint8, new uint8) uint8
- func Xchg64(ptr *uint64, new uint64) uint64
- func Xchgint32(ptr *int32, new int32) int32
- func Xchgint64(ptr *int64, new int64) int64
- func Xchguintptr(ptr *uintptr, new uintptr) uintptr
- type Bool
- type Float64
- type Int32
- type Int64
- type Pointer
- type Uint8
- type Uint32
- func (u *Uint32) Add(delta int32) uint32
- func (u *Uint32) And(value uint32)
- func (u *Uint32) CompareAndSwap(old, new uint32) bool
- func (u *Uint32) CompareAndSwapRelease(old, new uint32) bool
- func (u *Uint32) Load() uint32
- func (u *Uint32) LoadAcquire() uint32
- func (u *Uint32) Or(value uint32)
- func (u *Uint32) Store(value uint32)
- func (u *Uint32) StoreRelease(value uint32)
- func (u *Uint32) Swap(value uint32) uint32
- type Uint64
- type Uintptr
- func (u *Uintptr) Add(delta uintptr) uintptr
- func (u *Uintptr) CompareAndSwap(old, new uintptr) bool
- func (u *Uintptr) Load() uintptr
- func (u *Uintptr) LoadAcquire() uintptr
- func (u *Uintptr) Store(value uintptr)
- func (u *Uintptr) StoreRelease(value uintptr)
- func (u *Uintptr) Swap(value uintptr) uintptr
- type UnsafePointer
Constants ¶
This section is empty.
Variables ¶
This section is empty.