Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for runtime_procPin (0.88 sec)

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

    	gp.m.locks--
    }
    
    //go:linkname sync_runtime_procPin sync.runtime_procPin
    //go:nosplit
    func sync_runtime_procPin() int {
    	return procPin()
    }
    
    //go:linkname sync_runtime_procUnpin sync.runtime_procUnpin
    //go:nosplit
    func sync_runtime_procUnpin() {
    	procUnpin()
    }
    
    //go:linkname sync_atomic_runtime_procPin sync/atomic.runtime_procPin
    //go:nosplit
    func sync_atomic_runtime_procPin() int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
Back to top