- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for UnsafePointer (0.27 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/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go
break } ptr, ok := t.Underlying().(*types.Pointer) if !ok { break } // Here arg is *(*p)(v) elem, ok := ptr.Elem().Underlying().(*types.Basic) if !ok || elem.Kind() != types.UnsafePointer { break } // Here arg is *(*unsafe.Pointer)(v) call, ok = call.Args[0].(*ast.CallExpr) if !ok || len(call.Args) != 1 { break } // Here arg is *(*unsafe.Pointer)(f(v))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 11.2K 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) -
gorm.go
if db.Statement != nil && db.Statement.ConnPool != nil { connPool = db.Statement.ConnPool } if tx, ok := connPool.(*sql.Tx); ok && tx != nil { return (*sql.DB)(reflect.ValueOf(tx).Elem().FieldByName("db").UnsafePointer()), nil } if dbConnector, ok := connPool.(GetDBConnector); ok && dbConnector != nil { if sqldb, err := dbConnector.GetDBConn(); sqldb != nil || err != nil { return sqldb, err } }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sun Aug 20 11:46:56 UTC 2023 - 11.6K 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)