- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for UnsafePointer (0.16 sec)
-
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) -
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) -
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) -
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) -
src/runtime/cgocall.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:47 UTC 2024 - 24.2K bytes - Viewed (0) -
src/fmt/print.go
} } func (p *pp) fmtPointer(value reflect.Value, verb rune) { var u uintptr switch value.Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.Slice, reflect.UnsafePointer: u = uintptr(value.UnsafePointer()) default: p.badVerb(verb) return } switch verb { case 'v': if p.fmt.sharpV { p.buf.writeByte('(') p.buf.writeString(value.Type().String())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:22:43 UTC 2024 - 31.8K bytes - Viewed (0) -
src/runtime/pinner.go
e := efaceOf(i) etyp := e._type if etyp == nil { panic(errorString("runtime.Pinner: argument is nil")) } if kind := etyp.Kind_ & abi.KindMask; kind != abi.Pointer && kind != abi.UnsafePointer { panic(errorString("runtime.Pinner: argument is not a pointer: " + toRType(etyp).string())) } if inUserArenaChunk(uintptr(e.data)) { // Arena-allocated objects are not eligible for pinning.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
// package name, as defined by the import environment of file. func TypeExpr(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr { switch t := typ.(type) { case *types.Basic: switch t.Kind() { case types.UnsafePointer: return &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")} default: return ast.NewIdent(t.Name()) } case *types.Pointer: x := TypeExpr(f, pkg, t.Elem()) if x == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
src/internal/abi/type.go
Int64 Uint Uint8 Uint16 Uint32 Uint64 Uintptr Float32 Float64 Complex64 Complex128 Array Chan Func Interface Map Pointer Slice String Struct UnsafePointer ) const ( // TODO (khr, drchase) why aren't these in TFlag? Investigate, fix if possible. KindDirectIface Kind = 1 << 5 KindGCProg Kind = 1 << 6 // Type.gc points to GC program
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 17 21:09:59 UTC 2024 - 21.8K bytes - Viewed (0) -
src/go/types/builtins.go
check.verifyVersionf(call.Fun, go1_17, "unsafe.Add") check.assignment(x, Typ[UnsafePointer], "argument to unsafe.Add") if x.mode == invalid { return } y := args[1] if !check.isValidIndex(y, InvalidUnsafeAdd, "length", true) { return } x.mode = value x.typ = Typ[UnsafePointer] if check.recordTypes() { check.recordBuiltinType(call.Fun, makeSig(x.typ, x.typ, y.typ))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.2K bytes - Viewed (0)