Involved Source Filesatomic_amd64.go 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.stubs.gotypes.gotypes_64bit.gounaligned.goatomic_amd64.s
Package-Level Type Names (total 12, in which 10 are exported)
/* sort exporteds by: | */
Bool is an atomically accessed bool value.
A Bool must not be copied. Inherits noCopy from Uint8. Load accesses and returns the value atomically. Store updates the value atomically.
var runtime.freezing
Float64 is an atomically accessed float64 value.
8-byte aligned on all platforms, unlike a regular float64.
A Float64 must not be copied. Inherits noCopy and align64 from Uint64. Load accesses and returns the value atomically. Store updates the value atomically.
Int32 is an atomically accessed int32 value.
An Int32 must not be copied.noCopynoCopyvalueint32 Add adds delta to i atomically, returning
the new updated value.
This operation wraps around in the usual
two's-complement way. CompareAndSwap atomically compares i's value with old,
and if they're equal, swaps i's value with new.
It reports whether the swap ran. Load accesses and returns the value atomically. Store updates the value atomically. Swap replaces i's value with new, returning
i's value before the replacement.
var runtime.pendingPreemptSignals
Int64 is an atomically accessed int64 value.
8-byte aligned on all platforms, unlike a regular int64.
An Int64 must not be copied.noCopynoCopyvalueint64 Add adds delta to i atomically, returning
the new updated value.
This operation wraps around in the usual
two's-complement way. CompareAndSwap atomically compares i's value with old,
and if they're equal, swaps i's value with new.
It reports whether the swap ran. Load accesses and returns the value atomically. Store updates the value atomically. Swap replaces i's value with new, returning
i's value before the replacement.
Type Parameters:
T: any Pointer is an atomic pointer of type *T.uUnsafePointer CompareAndSwap atomically (with respect to other methods)
compares u's value with old, and if they're equal,
swaps u's value with new.
It reports whether the swap ran. CompareAndSwapNoWB atomically (with respect to other methods)
compares u's value with old, and if they're equal,
swaps u's value with new.
It reports whether the swap ran.
WARNING: As the name implies this operation does *not*
perform a write barrier on value, and so this operation may
hide pointers from the GC. Use with care and sparingly.
It is safe to use with values not found in the Go heap.
Prefer CompareAndSwap instead. Load accesses and returns the value atomically. Store updates the value atomically. StoreNoWB updates the value atomically.
WARNING: As the name implies this operation does *not*
perform a write barrier on value, and so this operation may
hide pointers from the GC. Use with care and sparingly.
It is safe to use with values not found in the Go heap.
Prefer Store instead.
var runtime.godebugEnvatomic.Pointer[string]
var runtime.godebugNewIncNonDefaultatomic.Pointer[func(string) func()]
var runtime.godebugUpdateatomic.Pointer[func(string, string)]
Uint32 is an atomically accessed uint32 value.
A Uint32 must not be copied.noCopynoCopyvalueuint32 Add adds delta to u atomically, returning
the new updated value.
This operation wraps around in the usual
two's-complement way. And takes value and performs a bit-wise
"and" operation with the value of u, storing
the result into u.
The full process is performed atomically. CompareAndSwap atomically compares u's value with old,
and if they're equal, swaps u's value with new.
It reports whether the swap ran. CompareAndSwapRelease is a partially unsynchronized version
of Cas that relaxes ordering constraints. Other threads
may observe operations that occur after this operation to
precede it, but no operation that precedes it
on this thread can be observed to occur after it.
It reports whether the swap ran.
WARNING: Use sparingly and with great care. Load accesses and returns the value atomically. LoadAcquire is a partially unsynchronized version
of Load that relaxes ordering constraints. Other threads
may observe operations that precede this operation to
occur after it, but no operation that occurs after it
on this thread can be observed to occur before it.
WARNING: Use sparingly and with great care. Or takes value and performs a bit-wise
"or" operation with the value of u, storing
the result into u.
The full process is performed atomically. Store updates the value atomically. StoreRelease is a partially unsynchronized version
of Store that relaxes ordering constraints. Other threads
may observe operations that occur after this operation to
precede it, but no operation that precedes it
on this thread can be observed to occur after it.
WARNING: Use sparingly and with great care. Swap replaces u's value with new, returning
u's value before the replacement.
func runtime.exitThread(wait *Uint32)
var runtime.extraMInUse
var runtime.extraMLength
var runtime.extraMWaiters
var runtime.fingStatus
var runtime.netpollInited
var runtime.netpollWaiters
var runtime.netpollWakeSig
var runtime.panicking
var runtime.runningPanicDefers
Uint64 is an atomically accessed uint64 value.
8-byte aligned on all platforms, unlike a regular uint64.
A Uint64 must not be copied.noCopynoCopyvalueuint64 Add adds delta to u atomically, returning
the new updated value.
This operation wraps around in the usual
two's-complement way. CompareAndSwap atomically compares u's value with old,
and if they're equal, swaps u's value with new.
It reports whether the swap ran. Load accesses and returns the value atomically. LoadAcquire is a partially unsynchronized version
of Load that relaxes ordering constraints. Other threads
may observe operations that precede this operation to
occur after it, but no operation that occurs after it
on this thread can be observed to occur before it.
WARNING: Use sparingly and with great care. Store updates the value atomically. StoreRelease is a partially unsynchronized version
of Store that relaxes ordering constraints. Other threads
may observe operations that occur after this operation to
precede it, but no operation that precedes it
on this thread can be observed to occur after it.
WARNING: Use sparingly and with great care. Swap replaces u's value with new, returning
u's value before the replacement.
Uint8 is an atomically accessed uint8 value.
A Uint8 must not be copied.noCopynoCopyvalueuint8 And takes value and performs a bit-wise
"and" operation with the value of u, storing
the result into u.
The full process is performed atomically. Load accesses and returns the value atomically. Or takes value and performs a bit-wise
"or" operation with the value of u, storing
the result into u.
The full process is performed atomically. Store updates the value atomically.
Uintptr is an atomically accessed uintptr value.
A Uintptr must not be copied.noCopynoCopyvalueuintptr Add adds delta to u atomically, returning
the new updated value.
This operation wraps around in the usual
two's-complement way. CompareAndSwap atomically compares u's value with old,
and if they're equal, swaps u's value with new.
It reports whether the swap ran. Load accesses and returns the value atomically. LoadAcquire is a partially unsynchronized version
of Load that relaxes ordering constraints. Other threads
may observe operations that precede this operation to
occur after it, but no operation that occurs after it
on this thread can be observed to occur before it.
WARNING: Use sparingly and with great care. Store updates the value atomically. StoreRelease is a partially unsynchronized version
of Store that relaxes ordering constraints. Other threads
may observe operations that occur after this operation to
precede it, but no operation that precedes it
on this thread can be observed to occur after it.
WARNING: Use sparingly and with great care. Swap replaces u's value with new, returning
u's value before the replacement.
var runtime.extraM
UnsafePointer is an atomically accessed unsafe.Pointer value.
Note that because of the atomicity guarantees, stores to values
of this type never trigger a write barrier, and the relevant
methods are suffixed with "NoWB" to indicate that explicitly.
As a result, this type should be used carefully, and sparingly,
mostly with values that do not live in the Go heap anyway.
An UnsafePointer must not be copied.noCopynoCopyvalueunsafe.Pointer CompareAndSwap atomically compares u's value with old,
and if they're equal, swaps u's value with new.
It reports whether the swap ran. CompareAndSwapNoWB atomically (with respect to other methods)
compares u's value with old, and if they're equal,
swaps u's value with new.
It reports whether the swap ran.
WARNING: As the name implies this operation does *not*
perform a write barrier on value, and so this operation may
hide pointers from the GC. Use with care and sparingly.
It is safe to use with values not found in the Go heap.
Prefer CompareAndSwap instead. Load accesses and returns the value atomically. Store updates the value atomically. StoreNoWB updates the value atomically.
WARNING: As the name implies this operation does *not*
perform a write barrier on value, and so this operation may
hide pointers from the GC. Use with care and sparingly.
It is safe to use with values not found in the Go heap.
Prefer Store instead.
var runtime.bbuckets
var runtime.buckhash
var runtime.mbuckets
var runtime.xbuckets
align64 may be added to structs that must be 64-bit aligned.
This struct is recognized by a special case in the compiler
and will not work if copied to any other package.
noCopy may be embedded into structs which must not be copied
after the first use.
See https://golang.org/issues/8005#issuecomment-190753527
for details. Lock is a no-op used by -copylocks checker from `go vet`.(*noCopy) Unlock()
*noCopy : sync.Locker
Package-Level Functions (total 45, in which 42 are exported)
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.