Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for UnsafePointer (0.26 sec)

  1. 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)
  2. 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)
  3. src/runtime/traceregion.go

    // It holds a linked list of traceRegionAllocBlock.
    type traceRegionAlloc struct {
    	lock     mutex
    	dropping atomic.Bool          // For checking invariants.
    	current  atomic.UnsafePointer // *traceRegionAllocBlock
    	full     *traceRegionAllocBlock
    }
    
    // traceRegionAllocBlock is a block in traceRegionAlloc.
    //
    // traceRegionAllocBlock is allocated from non-GC'd memory, so it must not
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/universe.go

    	Float64:       {Float64, IsFloat, "float64"},
    	Complex64:     {Complex64, IsComplex, "complex64"},
    	Complex128:    {Complex128, IsComplex, "complex128"},
    	String:        {String, IsString, "string"},
    	UnsafePointer: {UnsafePointer, 0, "Pointer"},
    
    	UntypedBool:    {UntypedBool, IsBoolean | IsUntyped, "untyped bool"},
    	UntypedInt:     {UntypedInt, IsInteger | IsUntyped, "untyped int"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. src/go/types/universe.go

    	Float64:       {Float64, IsFloat, "float64"},
    	Complex64:     {Complex64, IsComplex, "complex64"},
    	Complex128:    {Complex128, IsComplex, "complex128"},
    	String:        {String, IsString, "string"},
    	UnsafePointer: {UnsafePointer, 0, "Pointer"},
    
    	UntypedBool:    {UntypedBool, IsBoolean | IsUntyped, "untyped bool"},
    	UntypedInt:     {UntypedInt, IsInteger | IsUntyped, "untyped int"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. src/go/internal/gcimporter/support.go

    	types.Typ[types.UntypedRune],
    	types.Typ[types.UntypedFloat],
    	types.Typ[types.UntypedComplex],
    	types.Typ[types.UntypedString],
    	types.Typ[types.UntypedNil],
    
    	// package unsafe
    	types.Typ[types.UnsafePointer],
    
    	// invalid type
    	types.Typ[types.Invalid], // only appears in packages with errors
    
    	// used internally by gc; never used by this package or in .a files
    	// not to be confused with the universe any
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. src/internal/fmtsort/sort.go

    	case reflect.Bool:
    		a, b := aVal.Bool(), bVal.Bool()
    		switch {
    		case a == b:
    			return 0
    		case a:
    			return 1
    		default:
    			return -1
    		}
    	case reflect.Pointer, reflect.UnsafePointer:
    		return cmp.Compare(aVal.Pointer(), bVal.Pointer())
    	case reflect.Chan:
    		if c, ok := nilCompare(aVal, bVal); ok {
    			return c
    		}
    		return cmp.Compare(aVal.Pointer(), bVal.Pointer())
    	case reflect.Struct:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. src/reflect/value.go

    	case Uintptr:
    		*(*uintptr)(v.ptr) = uintptr(x)
    	}
    }
    
    // SetPointer sets the [unsafe.Pointer] value v to x.
    // It panics if v's Kind is not [UnsafePointer].
    func (v Value) SetPointer(x unsafe.Pointer) {
    	v.mustBeAssignable()
    	v.mustBe(UnsafePointer)
    	*(*unsafe.Pointer)(v.ptr) = x
    }
    
    // SetString sets v's underlying value to x.
    // It panics if v's Kind is not [String] or if [Value.CanSet] returns false.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  9. src/go/types/check_test.go

    	return (*bool)(v.FieldByName(name).Addr().UnsafePointer())
    }
    
    // stringFieldAddr(conf, name) returns the address of the string field conf.<name>.
    // For accessing unexported fields.
    func stringFieldAddr(conf *Config, name string) *string {
    	v := reflect.Indirect(reflect.ValueOf(conf))
    	return (*string)(v.FieldByName(name).Addr().UnsafePointer())
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. src/internal/reflectlite/value.go

    	// of v.
    	return (*abi.Type)(abi.NoEscape(unsafe.Pointer(v.typ_)))
    }
    
    // pointer returns the underlying pointer represented by v.
    // v.Kind() must be Pointer, Map, Chan, Func, or UnsafePointer
    func (v Value) pointer() unsafe.Pointer {
    	if v.typ().Size() != goarch.PtrSize || !v.typ().Pointers() {
    		panic("can't call pointer on a non-pointer Value")
    	}
    	if v.flag&flagIndir != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 13.6K bytes
    - Viewed (0)
Back to top