Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for atomic_casPointer (0.28 sec)

  1. src/runtime/atomic_pointer.go

    	atomicstorep(unsafe.Pointer(ptr), new)
    }
    
    // atomic_casPointer is the implementation of runtime/internal/UnsafePointer.CompareAndSwap
    // (like CompareAndSwapNoWB but with the write barrier).
    //
    //go:nosplit
    //go:linkname atomic_casPointer internal/runtime/atomic.casPointer
    func atomic_casPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
    	if writeBarrier.enabled {
    		atomicwb(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)
  2. src/runtime/iface.go

    	newC := buildTypeAssertCache(oldC, t, tab)
    
    	// Update cache. Use compare-and-swap so if multiple threads
    	// are fighting to update the cache, at least one of their
    	// updates will stick.
    	atomic_casPointer((*unsafe.Pointer)(unsafe.Pointer(&s.Cache)), unsafe.Pointer(oldC), unsafe.Pointer(newC))
    
    	return tab
    }
    
    func buildTypeAssertCache(oldC *abi.TypeAssertCache, typ *_type, tab *itab) *abi.TypeAssertCache {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top