Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for atomicstatus (0.18 sec)

  1. src/runtime/coro.go

    // than regular goroutine switches, so this path is heavily
    // optimized to remove unnecessary work.
    // The fast path here is three CAS: the one at the top on gp.atomicstatus,
    // the one in the middle to choose the next g,
    // and the one at the bottom on gnext.atomicstatus.
    // It is important not to add more atomic operations or other
    // expensive operations to the fast path.
    func coroswitch_m(gp *g) {
    	c := gp.coroarg
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:18 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. src/runtime/runtime-gdb.py

    		vp = gdb.lookup_type('void').pointer()
    		for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
    			if ptr['atomicstatus']['value'] == G_DEAD:
    				continue
    			s = ' '
    			if ptr['m']:
    				s = '*'
    			pc = ptr['sched']['pc'].cast(vp)
    			pc = pc_to_int(pc)
    			blk = gdb.block_for_pc(pc)
    			status = int(ptr['atomicstatus']['value'])
    			st = sts.get(status, "unknown(%d)" % status)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  3. src/runtime/export_debug_test.go

    	// TODO(49370): This code is riddled with write barriers, but called from
    	// a signal handler. Add the go:nowritebarrierrec annotation and restructure
    	// this to avoid write barriers.
    
    	switch h.gp.atomicstatus.Load() {
    	case _Grunning:
    		if getg().m != h.mp {
    			println("trap on wrong M", getg().m, h.mp)
    			return false
    		}
    		// Save the signal context
    		h.saveSigContext(ctxt)
    		// Set PC to debugCallV2.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. src/runtime/proc.go

    	const yieldDelay = 5 * 1000
    	var nextYield int64
    
    	// loop if gp->atomicstatus is in a scan state giving
    	// GC time to finish and change the state to oldval.
    	for i := 0; !gp.atomicstatus.CompareAndSwap(oldval, newval); i++ {
    		if oldval == _Gwaiting && gp.atomicstatus.Load() == _Grunnable {
    			systemstack(func() {
    				// Call on the systemstack to prevent throw from counting
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  5. src/runtime/runtime2.go

    	// 4. When a panic is recovered and control returns to the respective frame,
    	//    param may point to a savedOpenDeferState.
    	param        unsafe.Pointer
    	atomicstatus atomic.Uint32
    	stackLock    uint32 // sigprof/scang lock; TODO: fold in to atomicstatus
    	goid         uint64
    	schedlink    guintptr
    	waitsince    int64      // approx time when the g become blocked
    	waitreason   waitReason // if status==Gwaiting
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  6. src/runtime/mgcmark.go

    	if readgstatus(gp)&_Gscan == 0 {
    		print("runtime:scanstack: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", hex(readgstatus(gp)), "\n")
    		throw("scanstack - bad status")
    	}
    
    	switch readgstatus(gp) &^ _Gscan {
    	default:
    		print("runtime: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
    		throw("mark - bad status")
    	case _Gdead:
    		return 0
    	case _Grunning:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  7. src/runtime/stack.go

    	return 1 << s
    }
    
    // Called from runtime·morestack when more stack is needed.
    // Allocate larger stack and relocate to new stack.
    // Stack growth is multiplicative, for constant amortized cost.
    //
    // g->atomicstatus will be Grunning or Gscanrunning upon entry.
    // If the scheduler is trying to stop this g, then it will set preemptStop.
    //
    // This must be nowritebarrierrec because it can be called as part of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top