- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for runtime_procPin (1.15 sec)
-
src/sync/export_test.go
// license that can be found in the LICENSE file. package sync // Export for testing. var Runtime_Semacquire = runtime_Semacquire var Runtime_Semrelease = runtime_Semrelease var Runtime_procPin = runtime_procPin var Runtime_procUnpin = runtime_procUnpin // poolDequeue testing. type PoolDequeue interface { PushHead(val any) bool PopHead() (any, bool) PopTail() (any, bool) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 16:39:52 UTC 2023 - 1.2K bytes - Viewed (0) -
src/sync/atomic/value.go
for { typ := LoadPointer(&vp.typ) if typ == nil { // Attempt to start first store. // Disable preemption so that other goroutines can use // active spin wait to wait for completion. runtime_procPin() if !CompareAndSwapPointer(&vp.typ, nil, unsafe.Pointer(&firstStoreInProgress)) { runtime_procUnpin() continue } // Complete first store. StorePointer(&vp.data, vlp.data)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:48:55 UTC 2024 - 5.9K bytes - Viewed (0) -
src/sync/pool.go
// Check whether p is nil to get a panic. // Otherwise the nil dereference happens while the m is pinned, // causing a fatal error rather than a panic. if p == nil { panic("nil Pool") } pid := runtime_procPin() // In pinSlow we store to local and then to localSize, here we load in opposite order. // Since we've disabled preemption, GC cannot happen in between. // Thus here we must observe local at least as large localSize.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 9.4K bytes - Viewed (0) -
src/sync/pool_test.go
defer debug.SetGCPercent(debug.SetGCPercent(-1)) var p Pool if p.Get() != nil { t.Fatal("expected empty") } // Make sure that the goroutine doesn't migrate to another P // between Put and Get calls. Runtime_procPin() p.Put("a") p.Put("b") if g := p.Get(); g != "a" { t.Fatalf("got %#v; want a", g) } if g := p.Get(); g != "b" { t.Fatalf("got %#v; want b", g) } if g := p.Get(); g != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8K bytes - Viewed (0)