Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 488 for swapped (0.1 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/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)
  4. 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)
  5. 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)
  6. src/internal/runtime/atomic/atomic_mipsx.go

    //go:nosplit
    func Xchg64(addr *uint64, new uint64) (old uint64) {
    	lockAndCheck(addr)
    
    	old = *addr
    	*addr = new
    
    	unlock()
    	return
    }
    
    //go:nosplit
    func Cas64(addr *uint64, old, new uint64) (swapped bool) {
    	lockAndCheck(addr)
    
    	if (*addr) == old {
    		*addr = new
    		unlock()
    		return true
    	}
    
    	unlock()
    	return false
    }
    
    //go:nosplit
    func Load64(addr *uint64) (val uint64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 20:08:37 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  7. src/image/geom.go

    	return s.Min.X <= r.Min.X && r.Max.X <= s.Max.X &&
    		s.Min.Y <= r.Min.Y && r.Max.Y <= s.Max.Y
    }
    
    // Canon returns the canonical version of r. The returned rectangle has minimum
    // and maximum coordinates swapped if necessary so that it is well-formed.
    func (r Rectangle) Canon() Rectangle {
    	if r.Max.X < r.Min.X {
    		r.Min.X, r.Max.X = r.Max.X, r.Min.X
    	}
    	if r.Max.Y < r.Min.Y {
    		r.Min.Y, r.Max.Y = r.Max.Y, r.Min.Y
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  8. src/sync/atomic/value.go

    //
    // All calls to CompareAndSwap for a given Value must use values of the same
    // concrete type. CompareAndSwap of an inconsistent type panics, as does
    // CompareAndSwap(old, nil).
    func (v *Value) CompareAndSwap(old, new any) (swapped bool) {
    	if new == nil {
    		panic("sync/atomic: compare and swap of nil value into Value")
    	}
    	vp := (*efaceWords)(unsafe.Pointer(v))
    	np := (*efaceWords)(unsafe.Pointer(&new))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:48:55 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/controller/controller.go

    	// dynamicTransformers updates the transformers when encryption config file changes.
    	dynamicTransformers *encryptionconfig.DynamicTransformers
    
    	// identity of the api server
    	apiServerID string
    
    	// can be swapped during testing
    	getEncryptionConfigHash func(ctx context.Context, filepath string) (string, error)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  10. src/internal/runtime/atomic/atomic_test.go

    	}
    
    	x.before = _magic
    	x.after = _magic
    	for j := 0; j < 32; j += 1 {
    		x.i = (1 << j) + 0
    		x.o = (1 << j) + 0
    		x.n = (1 << j) + 1
    		if !atomic.CasRel(&x.i, x.o, x.n) {
    			t.Fatalf("should have swapped %#x %#x", x.o, x.n)
    		}
    
    		if x.i != x.n {
    			t.Fatalf("wrong x.i after swap: x.i=%#x x.n=%#x", x.i, x.n)
    		}
    
    		if x.before != _magic || x.after != _magic {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top