Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for wantAsyncPreempt (0.13 sec)

  1. src/runtime/preempt.go

    		// new context for the P.
    		print("runtime: asyncPreemptStack=", asyncPreemptStack, "\n")
    		throw("async stack too large")
    	}
    }
    
    // wantAsyncPreempt returns whether an asynchronous preemption is
    // queued for gp.
    func wantAsyncPreempt(gp *g) bool {
    	// Check both the G and the P.
    	return (gp.preempt || gp.m.p != 0 && gp.m.p.ptr().preempt) && readgstatus(gp)&^_Gscan == _Grunning
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. src/runtime/os_windows.go

    	stdcall2(_GetThreadContext, thread, uintptr(unsafe.Pointer(c)))
    
    	unlock(&suspendLock)
    
    	// Does it want a preemption and is it safe to preempt?
    	gp := gFromSP(mp, c.sp())
    	if gp != nil && wantAsyncPreempt(gp) {
    		if ok, newpc := isAsyncSafePoint(gp, c.ip(), c.sp(), c.lr()); ok {
    			// Inject call to asyncPreempt
    			targetPC := abi.FuncPCABI0(asyncPreempt)
    			switch GOARCH {
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  3. src/runtime/signal_unix.go

    	}
    	dieFromSignal(_SIGPIPE)
    }
    
    // doSigPreempt handles a preemption signal on gp.
    func doSigPreempt(gp *g, ctxt *sigctxt) {
    	// Check if this G wants to be preempted and is safe to
    	// preempt.
    	if wantAsyncPreempt(gp) {
    		if ok, newpc := isAsyncSafePoint(gp, ctxt.sigpc(), ctxt.sigsp(), ctxt.siglr()); ok {
    			// Adjust the PC and inject a call to asyncPreempt.
    			ctxt.pushCall(abi.FuncPCABI0(asyncPreempt), newpc)
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 16:04:54 UTC 2024
    - 45K bytes
    - Viewed (0)
Back to top