Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for UnsafePointer (0.21 sec)

  1. src/reflect/deepequal.go

    				return false
    			}
    		}
    		return true
    	case Slice:
    		if v1.IsNil() != v2.IsNil() {
    			return false
    		}
    		if v1.Len() != v2.Len() {
    			return false
    		}
    		if v1.UnsafePointer() == v2.UnsafePointer() {
    			return true
    		}
    		// Special case for []byte, which is common.
    		if v1.Type().Elem().Kind() == Uint8 {
    			return bytealg.Equal(v1.Bytes(), v2.Bytes())
    		}
    		for i := 0; i < v1.Len(); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. src/reflect/nih_test.go

    	shouldPanic("reflect: reflect.Value.Pointer on an invalid notinheap pointer", func() { v.Pointer() })
    	shouldPanic("reflect: reflect.Value.UnsafePointer on an invalid notinheap pointer", func() { v.UnsafePointer() })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 01:16:54 UTC 2022
    - 1004 bytes
    - Viewed (0)
  3. src/reflect/set_test.go

    		mv.SetMapIndex(ValueOf(c1), ValueOf(c2))
    		x, ok := m[c1]
    		if x != c2 {
    			t.Errorf("#6 after SetMapIndex(c1, c2): %p (!= %p), %t (map=%v)", x, c2, ok, m)
    		}
    		if p := mv.MapIndex(ValueOf(c1)).UnsafePointer(); p != ValueOf(c2).UnsafePointer() {
    			t.Errorf("#6 MapIndex(c1) = %#x want %p", p, c2)
    		}
    	}
    	{
    		// convert identical underlying types
    		type MyBuffer bytes.Buffer
    		m := make(map[*MyBuffer]*bytes.Buffer)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 13:56:11 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  4. src/internal/runtime/atomic/types.go

    // mostly with values that do not live in the Go heap anyway.
    //
    // An UnsafePointer must not be copied.
    type UnsafePointer struct {
    	noCopy noCopy
    	value  unsafe.Pointer
    }
    
    // Load accesses and returns the value atomically.
    //
    //go:nosplit
    func (u *UnsafePointer) Load() unsafe.Pointer {
    	return Loadp(unsafe.Pointer(&u.value))
    }
    
    // StoreNoWB updates the value atomically.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  5. src/runtime/atomic_pointer.go

    // (like StoreNoWB but with the write barrier).
    //
    //go:nosplit
    //go:linkname atomic_storePointer internal/runtime/atomic.storePointer
    func atomic_storePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
    	atomicstorep(unsafe.Pointer(ptr), new)
    }
    
    // atomic_casPointer is the implementation of runtime/internal/UnsafePointer.CompareAndSwap
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. src/runtime/mspanset.go

    // atomicSpanSetSpinePointer is an atomically-accessed spanSetSpinePointer.
    //
    // It has the same semantics as atomic.UnsafePointer.
    type atomicSpanSetSpinePointer struct {
    	a atomic.UnsafePointer
    }
    
    // Loads the spanSetSpinePointer and returns it.
    //
    // It has the same semantics as atomic.UnsafePointer.
    func (s *atomicSpanSetSpinePointer) Load() spanSetSpinePointer {
    	return spanSetSpinePointer{s.a.Load()}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go

    		(*ast.UnaryExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		switch x := n.(type) {
    		case *ast.CallExpr:
    			if len(x.Args) == 1 &&
    				hasBasicType(pass.TypesInfo, x.Fun, types.UnsafePointer) &&
    				hasBasicType(pass.TypesInfo, x.Args[0], types.Uintptr) &&
    				!isSafeUintptr(pass.TypesInfo, x.Args[0]) {
    				pass.ReportRangef(x, "possible misuse of unsafe.Pointer")
    			}
    		case *ast.StarExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/basic.go

    	// predeclared types
    	Bool
    	Int
    	Int8
    	Int16
    	Int32
    	Int64
    	Uint
    	Uint8
    	Uint16
    	Uint32
    	Uint64
    	Uintptr
    	Float32
    	Float64
    	Complex64
    	Complex128
    	String
    	UnsafePointer
    
    	// types for untyped values
    	UntypedBool
    	UntypedInt
    	UntypedRune
    	UntypedFloat
    	UntypedComplex
    	UntypedString
    	UntypedNil
    
    	// aliases
    	Byte = Uint8
    	Rune = Int32
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  9. src/runtime/tracemap.go

    package runtime
    
    import (
    	"internal/cpu"
    	"internal/goarch"
    	"internal/runtime/atomic"
    	"runtime/internal/sys"
    	"unsafe"
    )
    
    type traceMap struct {
    	root atomic.UnsafePointer // *traceMapNode (can't use generics because it's notinheap)
    	_    cpu.CacheLinePad
    	seq  atomic.Uint64
    	_    cpu.CacheLinePad
    	mem  traceRegionAlloc
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  10. src/go/types/basic.go

    	// predeclared types
    	Bool
    	Int
    	Int8
    	Int16
    	Int32
    	Int64
    	Uint
    	Uint8
    	Uint16
    	Uint32
    	Uint64
    	Uintptr
    	Float32
    	Float64
    	Complex64
    	Complex128
    	String
    	UnsafePointer
    
    	// types for untyped values
    	UntypedBool
    	UntypedInt
    	UntypedRune
    	UntypedFloat
    	UntypedComplex
    	UntypedString
    	UntypedNil
    
    	// aliases
    	Byte = Uint8
    	Rune = Int32
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top