Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for runqempty (0.6 sec)

  1. src/runtime/proc.go

    		// Ms that may be preparing to drop their P.
    		sched.needspinning.Store(1)
    		return nil, now
    	}
    
    	return pp, now
    }
    
    // runqempty reports whether pp has no Gs on its local run queue.
    // It never returns true spuriously.
    func runqempty(pp *p) bool {
    	// Defend against a race where 1) pp has G1 in runqnext but runqhead == runqtail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  2. src/runtime/export_test.go

    	for i := 0; i < iters; i++ {
    		*ready = 0
    		next0 := (i & 1) == 0
    		next1 := (i & 2) == 0
    		runqput(p, &gs[0], next0)
    		go func() {
    			for atomic.Xadd(ready, 1); atomic.Load(ready) != 2; {
    			}
    			if runqempty(p) {
    				println("next:", next0, next1)
    				throw("queue is empty")
    			}
    			done <- true
    		}()
    		for atomic.Xadd(ready, 1); atomic.Load(ready) != 2; {
    		}
    		runqput(p, &gs[1], next1)
    		runqget(p)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top