Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for systemstack (0.17 sec)

  1. src/runtime/lockrank_on.go

    // other (nosplit) call before this call (including the call to lock() itself).
    //
    // However, we switch to the systemstack to record the lock held to ensure that
    // we record an accurate lock ordering. e.g., without systemstack, a stack
    // split on entry to lock2() would record stack split locks as taken after l,
    // even though l is not actually locked yet.
    func lockWithRank(l *mutex, rank lockRank) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  2. src/runtime/stubs.go

    func mcall(fn func(*g))
    
    // systemstack runs fn on a system stack.
    // If systemstack is called from the per-OS-thread (g0) stack, or
    // if systemstack is called from the signal handling (gsignal) stack,
    // systemstack calls fn directly and returns.
    // Otherwise, systemstack is being called from the limited stack
    // of an ordinary goroutine. In this case, systemstack switches
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  3. src/runtime/pinner.go

    	if pin {
    		if pinState.isPinned() {
    			// multiple pins on same object, set multipin bit
    			pinState.setMultiPinned(true)
    			// and increase the pin counter
    			// TODO(mknyszek): investigate if systemstack is necessary here
    			systemstack(func() {
    				offset := objIndex * span.elemsize
    				span.incPinCounter(offset)
    			})
    		} else {
    			// set pin bit
    			pinState.setPinned(true)
    		}
    	} else {
    		// unpin
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/runtime/export_test.go

    	return (*LFNode)((*lfstack)(head).pop())
    }
    func LFNodeValidate(node *LFNode) {
    	lfnodeValidate((*lfnode)(unsafe.Pointer(node)))
    }
    
    func Netpoll(delta int64) {
    	systemstack(func() {
    		netpoll(delta)
    	})
    }
    
    func GCMask(x any) (ret []byte) {
    	systemstack(func() {
    		ret = getgcmask(x)
    	})
    	return
    }
    
    func RunSchedLocalQueueTest() {
    	pp := new(p)
    	gs := make([]g, len(pp.runq))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  5. src/runtime/os_freebsd.go

    // thus the code is largely similar. See Linux implementation
    // and lock_futex.go for comments.
    
    //go:nosplit
    func futexsleep(addr *uint32, val uint32, ns int64) {
    	systemstack(func() {
    		futexsleep1(addr, val, ns)
    	})
    }
    
    func futexsleep1(addr *uint32, val uint32, ns int64) {
    	var utp *umtx_time
    	if ns >= 0 {
    		var ut umtx_time
    		ut._clockid = _CLOCK_MONOTONIC
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  6. src/runtime/os_windows.go

    	case _WAIT_TIMEOUT:
    		return -1
    
    	case _WAIT_ABANDONED:
    		systemstack(func() {
    			throw("runtime.semasleep wait_abandoned")
    		})
    
    	case _WAIT_FAILED:
    		systemstack(func() {
    			print("runtime: waitforsingleobject wait_failed; errno=", getlasterror(), "\n")
    			throw("runtime.semasleep wait_failed")
    		})
    
    	default:
    		systemstack(func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  7. src/runtime/mgcwork.go

    // It's important that any use of gcWork during the mark phase prevent
    // the garbage collector from transitioning to mark termination since
    // gcWork may locally hold GC work buffers. This can be done by
    // disabling preemption (systemstack or acquirem).
    type gcWork struct {
    	// wbuf1 and wbuf2 are the primary and secondary work buffers.
    	//
    	// This can be thought of as a stack of both work buffers'
    	// pointers concatenated. When we pop the last pointer, we
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  8. src/runtime/stack_test.go

    	}
    }
    
    func TestTracebackSystemstack(t *testing.T) {
    	if GOARCH == "ppc64" || GOARCH == "ppc64le" {
    		t.Skip("systemstack tail call not implemented on ppc64x")
    	}
    
    	// Test that profiles correctly jump over systemstack,
    	// including nested systemstack calls.
    	pcs := make([]uintptr, 20)
    	pcs = pcs[:TracebackSystemstack(pcs, 5)]
    	// Check that runtime.TracebackSystemstack appears five times
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 23.1K bytes
    - Viewed (0)
  9. src/runtime/asm_wasm.s

    	// switch to g0
    	MOVD R2, g
    
    	// call fn
    	Get CTXT
    	I32WrapI64
    	I64Load $0
    	CALL
    
    	Get SP
    	I32Const $8
    	I32Add
    	Set SP
    
    	JMP runtime·badmcall2(SB)
    
    // func systemstack(fn func())
    TEXT runtime·systemstack(SB), NOSPLIT, $0-8
    	// R0 = fn
    	MOVD fn+0(FP), R0
    	// R1 = g.m
    	MOVD g_m(g), R1
    	// R2 = g0
    	MOVD m_g0(R1), R2
    
    	// if g == g0
    	Get g
    	Get R2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:26:51 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  10. src/runtime/mcache.go

    	size uintptr   // total size of stacks in list
    }
    
    // dummy mspan that contains no free objects.
    var emptymspan mspan
    
    func allocmcache() *mcache {
    	var c *mcache
    	systemstack(func() {
    		lock(&mheap_.lock)
    		c = (*mcache)(mheap_.cachealloc.alloc())
    		c.flushGen.Store(mheap_.sweepgen)
    		unlock(&mheap_.lock)
    	})
    	for i := range c.alloc {
    		c.alloc[i] = &emptymspan
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top