Standard Library

GoSyncAtomic

Go stdlib package — sync/atomic. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.AddInt32()Neutral
#
Signature
AddInt32(addr *int32, delta int32) int32

AddInt32 atomically adds delta to *addr and returns the new value.

.AddInt64()Neutral
#
Signature
AddInt64(addr *int64, delta int64) int64

AddInt64 atomically adds delta to *addr and returns the new value.

.AddUint32()Neutral
#
Signature
AddUint32(addr *uint32, delta uint32) uint32

AddUint32 atomically adds delta to *addr and returns the new value.

.AddUint64()Neutral
#
Signature
AddUint64(addr *uint64, delta uint64) uint64

AddUint64 atomically adds delta to *addr and returns the new value.

.AddUintptr()Neutral
#
Signature
AddUintptr(addr *uintptr, delta uintptr) uintptr

AddUintptr atomically adds delta to *addr and returns the new value.

.Bool.CompareAndSwap()Neutral
#
Signature
Bool.CompareAndSwap(old bool, new bool) bool

CompareAndSwap executes the compare-and-swap operation for the boolean value x.

.Bool.Load()Neutral
#
Signature
Bool.Load() bool

Load atomically loads and returns the value stored in x.

.Bool.Store()Neutral
#
Signature
Bool.Store(val bool)

Store atomically stores val into x.

.Bool.Swap()Neutral
#
Signature
Bool.Swap(new bool) bool

Swap atomically stores new into x and returns the previous value.

.CompareAndSwapInt32()Neutral
#
Signature
CompareAndSwapInt32(addr *int32, old int32, new int32) bool

CompareAndSwapInt32 executes the compare-and-swap operation for an int32 value.

Fully-Qualified Names

FQNField
sync/atomicfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # sync/atomic