func sync/atomic.SwapPointer
4 uses
sync/atomic (current package)
doc.go#L88: func SwapPointer(addr *unsafe.Pointer, new unsafe.Pointer) (old unsafe.Pointer)
type.go#L60: func (x *Pointer[T]) Swap(new *T) (old *T) { return (*T)(SwapPointer(&x.v, unsafe.Pointer(new))) }
value.go#L125: op.typ, op.data = np.typ, SwapPointer(&vp.data, np.data)
go.uber.org/atomic
unsafe_pointer.go#L52: return atomic.SwapPointer(&p.v, val)
|
The pages are generated with Golds v0.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. |