Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,340 for swapped (0.15 sec)

  1. src/sync/atomic/type.go

    func (x *Bool) Swap(new bool) (old bool) { return SwapUint32(&x.v, b32(new)) != 0 }
    
    // CompareAndSwap executes the compare-and-swap operation for the boolean value x.
    func (x *Bool) CompareAndSwap(old, new bool) (swapped bool) {
    	return CompareAndSwapUint32(&x.v, b32(old), b32(new))
    }
    
    // b32 returns a uint32 0 or 1 representing b.
    func b32(b bool) uint32 {
    	if b {
    		return 1
    	}
    	return 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. src/internal/syscall/unix/siginfo_linux.go

    // this struct corresponds to one used when Signo is SIGCHLD.
    //
    // NOTE fields are exported to be used by TestSiginfoChildLayout.
    type SiginfoChild struct {
    	Signo       int32
    	siErrnoCode                // Two int32 fields, swapped on MIPS.
    	_           [is64bit]int32 // Extra padding for 64-bit hosts only.
    
    	// End of common part. Beginning of signal-specific part.
    
    	Pid    int32
    	Uid    uint32
    	Status int32
    
    	// Pad to 128 bytes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. src/sync/atomic/doc.go

    func CompareAndSwapInt32(addr *int32, old, new int32) (swapped bool)
    
    // CompareAndSwapInt64 executes the compare-and-swap operation for an int64 value.
    // Consider using the more ergonomic and less error-prone [Int64.CompareAndSwap] instead
    // (particularly if you target 32-bit platforms; see the bugs section).
    func CompareAndSwapInt64(addr *int64, old, new int64) (swapped bool)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  4. src/sync/atomic/atomic_test.go

    		x.i = val
    		if !CompareAndSwapInt32(&x.i, val, val+1) {
    			t.Fatalf("should have swapped %#x %#x", val, val+1)
    		}
    		if x.i != val+1 {
    			t.Fatalf("wrong x.i after swap: x.i=%#x val+1=%#x", x.i, val+1)
    		}
    		x.i = val + 1
    		if CompareAndSwapInt32(&x.i, val, val+2) {
    			t.Fatalf("should not have swapped %#x %#x", val, val+2)
    		}
    		if x.i != val+1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 71.4K bytes
    - Viewed (0)
  5. src/sync/map_reference_test.go

    	Store(key, value any)
    	LoadOrStore(key, value any) (actual any, loaded bool)
    	LoadAndDelete(key any) (value any, loaded bool)
    	Delete(any)
    	Swap(key, value any) (previous any, loaded bool)
    	CompareAndSwap(key, old, new any) (swapped bool)
    	CompareAndDelete(key, old any) (deleted bool)
    	Range(func(key, value any) (shouldContinue bool))
    	Clear()
    }
    
    var (
    	_ mapInterface = &RWMutexMap{}
    	_ mapInterface = &DeepCopyMap{}
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  6. src/sync/map.go

    func (m *Map) CompareAndSwap(key, old, new any) (swapped bool) {
    	read := m.loadReadOnly()
    	if e, ok := read.m[key]; ok {
    		return e.tryCompareAndSwap(old, new)
    	} else if !read.amended {
    		return false // No existing value for key.
    	}
    
    	m.mu.Lock()
    	defer m.mu.Unlock()
    	read = m.loadReadOnly()
    	swapped = false
    	if e, ok := read.m[key]; ok {
    		swapped = e.tryCompareAndSwap(old, new)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  7. platforms/ide/ide/src/integTest/groovy/org/gradle/plugins/ide/AbstractSourcesAndJavadocJarsIntegrationTest.groovy

            ideFileContainsGradleApi("gradle-api")
        }
    
        @ToBeFixedForConfigurationCache
        @Requires(UnitTestPreconditions.StableGroovy) // localGroovy() version cannot be swapped-out when a snapshot Groovy build is used
        def "sources for localGroovy() are downloaded and attached"() {
            given:
            def repo = givenGroovyExistsInGradleRepo()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:12 UTC 2023
    - 20.9K bytes
    - Viewed (0)
  8. src/internal/runtime/atomic/atomic_arm.s

    	CMP	R3, R7
    	BNE	cas64fail
    
    	DMB	MB_ISHST
    
    	STREXD	R4, (R1), R0	// stores R4 and R5
    	CMP	$0, R0
    	BNE	cas64loop
    	MOVW	$1, R0
    
    	DMB	MB_ISH
    
    	MOVBU	R0, swapped+20(FP)
    	RET
    cas64fail:
    	MOVW	$0, R0
    	MOVBU	R0, swapped+20(FP)
    	RET
    
    TEXT armXadd64<>(SB),NOSPLIT,$0-20
    	// addr is already in R1
    	MOVW	delta_lo+4(FP), R2
    	MOVW	delta_hi+8(FP), R3
    
    add64loop:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. src/internal/syscall/unix/siginfo_linux_test.go

    	if v := unsafe.Sizeof(si); v != 128 {
    		t.Fatalf("sizeof: got %d, want 128", v)
    	}
    
    	ofSigno := 0
    	ofErrno := 4
    	ofCode := 8
    	if strings.HasPrefix(runtime.GOARCH, "mips") {
    		// These two fields are swapped on MIPS platforms.
    		ofErrno, ofCode = ofCode, ofErrno
    	}
    	ofPid := 12
    	if host64bit {
    		ofPid = 16
    	}
    	ofUid := ofPid + 4
    	ofStatus := ofPid + 8
    
    	offsets := []struct {
    		name string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. src/runtime/race.go

    //go:linkname abigen_sync_atomic_CompareAndSwapInt64 sync/atomic.CompareAndSwapInt64
    func abigen_sync_atomic_CompareAndSwapInt64(addr *int64, old, new int64) (swapped bool)
    
    //go:linkname abigen_sync_atomic_CompareAndSwapUint32 sync/atomic.CompareAndSwapUint32
    func abigen_sync_atomic_CompareAndSwapUint32(addr *uint32, old, new uint32) (swapped bool)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top