- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for SwapPointer (0.23 sec)
-
src/runtime/atomic_pointer.go
} //go:linkname sync_atomic_SwapUintptr sync/atomic.SwapUintptr func sync_atomic_SwapUintptr(ptr *uintptr, new uintptr) uintptr //go:linkname sync_atomic_SwapPointer sync/atomic.SwapPointer //go:nosplit func sync_atomic_SwapPointer(ptr *unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer { if writeBarrier.enabled { atomicwb(ptr, new) } if goexperiment.CgoCheck2 { cgoCheckPtrWrite(ptr, new)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 4K bytes - Viewed (0) -
src/sync/atomic/value.go
if typ != np.typ { panic("sync/atomic: swap of inconsistently typed value into Value") } op := (*efaceWords)(unsafe.Pointer(&old)) op.typ, op.data = np.typ, SwapPointer(&vp.data, np.data) return old } } // CompareAndSwap executes the compare-and-swap operation for the [Value]. // // All calls to CompareAndSwap for a given Value must use values of the same
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:48:55 UTC 2024 - 5.9K bytes - Viewed (0) -
src/sync/atomic/type.go
func (x *Pointer[T]) Store(val *T) { StorePointer(&x.v, unsafe.Pointer(val)) } // Swap atomically stores new into x and returns the previous value. func (x *Pointer[T]) Swap(new *T) (old *T) { return (*T)(SwapPointer(&x.v, unsafe.Pointer(new))) } // CompareAndSwap executes the compare-and-swap operation for x. func (x *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:37:29 UTC 2024 - 8.5K bytes - Viewed (0)