Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for procyield (0.35 sec)

  1. src/runtime/lock_sema.go

    		v := atomic.Loaduintptr(&l.key)
    		if v&locked == 0 {
    			// Unlocked. Try to lock.
    			if atomic.Casuintptr(&l.key, v, v|locked) {
    				timer.end()
    				return
    			}
    			i = 0
    		}
    		if i < spin {
    			procyield(active_spin_cnt)
    		} else if i < spin+passive_spin {
    			osyield()
    		} else {
    			// Someone else has it.
    			// l->waitm points to a linked list of M's waiting
    			// for this lock, chained through m->nextwaitm.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. src/runtime/lock_futex.go

    	}
    	for {
    		// Try for lock, spinning.
    		for i := 0; i < spin; i++ {
    			for l.key == mutex_unlocked {
    				if atomic.Cas(key32(&l.key), mutex_unlocked, wait) {
    					timer.end()
    					return
    				}
    			}
    			procyield(active_spin_cnt)
    		}
    
    		// Try for lock, rescheduling.
    		for i := 0; i < passive_spin; i++ {
    			for l.key == mutex_unlocked {
    				if atomic.Cas(key32(&l.key), mutex_unlocked, wait) {
    					timer.end()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:34 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. src/runtime/stubs.go

    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname procyield
    func procyield(cycles uint32)
    
    type neverCallThisFunction struct{}
    
    // goexit is the return stub at the top of every goroutine call stack.
    // Each goroutine stack is constructed as if goexit called the
    // goroutine's entry point function, so that when the entry point
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  4. src/runtime/preempt.go

    		// best-effort) and then sleep until we're notified
    		// that the goroutine is suspended.
    		if i == 0 {
    			nextYield = nanotime() + yieldDelay
    		}
    		if nanotime() < nextYield {
    			procyield(10)
    		} else {
    			osyield()
    			nextYield = nanotime() + yieldDelay/2
    		}
    	}
    }
    
    // resumeG undoes the effects of suspendG, allowing the suspended
    // goroutine to continue from its current safe-point.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. src/runtime/asm_riscv64.s

    	MOV	gobuf_ret(T0), A0
    	MOV	gobuf_ctxt(T0), CTXT
    	MOV	ZERO, gobuf_sp(T0)
    	MOV	ZERO, gobuf_ret(T0)
    	MOV	ZERO, gobuf_lr(T0)
    	MOV	ZERO, gobuf_ctxt(T0)
    	MOV	gobuf_pc(T0), T0
    	JALR	ZERO, T0
    
    // func procyield(cycles uint32)
    TEXT runtime·procyield(SB),NOSPLIT,$0-0
    	RET
    
    // Switch to m->g0's stack, call fn(g).
    // Fn must never return. It should gogo(&g->sched)
    // to keep running g.
    
    // func mcall(fn func(*g))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 13:57:06 UTC 2023
    - 27K bytes
    - Viewed (0)
  6. src/runtime/proc.go

    			})
    		}
    		if i == 0 {
    			nextYield = nanotime() + yieldDelay
    		}
    		if nanotime() < nextYield {
    			for x := 0; x < 10 && gp.atomicstatus.Load() != oldval; x++ {
    				procyield(1)
    			}
    		} else {
    			osyield()
    			nextYield = nanotime() + yieldDelay/2
    		}
    	}
    
    	if oldval == _Grunning {
    		// Track every gTrackingPeriod time a goroutine transitions out of running.
    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