Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for isAsyncSafePoint (0.17 sec)

  1. src/runtime/preempt.go

    // 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
    }
    
    // isAsyncSafePoint reports whether gp at instruction PC is an
    // asynchronous safe point. This indicates that:
    //
    // 1. It's safe to suspend gp and conservatively scan its stack and
    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

    	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:
    				throw("unsupported architecture")
    			case "386", "amd64":
    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

    // 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)
    		}
    	}
    
    	// Acknowledge the preemption.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 16:04:54 UTC 2024
    - 45K bytes
    - Viewed (0)
  4. src/runtime/traceback.go

    		// during the stack growth check. In that case, the function has
    		// not yet had a chance to do any writes to SP and is safe to unwind.
    		// isAsyncSafePoint does not allow assembly functions to be async preempted,
    		// and preemptPark double-checks that SPWRITE functions are not async preempted.
    		// So for GC stack traversal, we can safely ignore SPWRITE for the innermost frame,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  5. src/runtime/proc.go

    		dumpgstatus(gp)
    		throw("bad g status")
    	}
    
    	if gp.asyncSafePoint {
    		// Double-check that async preemption does not
    		// happen in SPWRITE assembly functions.
    		// isAsyncSafePoint must exclude this case.
    		f := findfunc(gp.sched.pc)
    		if !f.valid() {
    			throw("preempt at unknown pc")
    		}
    		if f.flag&abi.FuncFlagSPWrite != 0 {
    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