Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 119 for Getg (0.12 sec)

  1. src/runtime/os3_solaris.go

    func minit() {
    	asmcgocall(unsafe.Pointer(abi.FuncPCABI0(miniterrno)), unsafe.Pointer(&libc____errno))
    
    	minitSignals()
    
    	getg().m.procid = uint64(pthread_self())
    }
    
    // Called from dropm to undo the effect of an minit.
    func unminit() {
    	unminitSignals()
    	getg().m.procid = 0
    }
    
    // Called from exitm, but not from drop, to undo the effect of thread-owned
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. src/runtime/time.go

    	if t.ts != nil {
    		assertLockHeld(&t.ts.mu)
    	}
    	if raceenabled {
    		// Note that we are running on a system stack,
    		// so there is no chance of getg().m being reassigned
    		// out from under us while this function executes.
    		tsLocal := &getg().m.p.ptr().timers
    		if tsLocal.raceCtx == 0 {
    			tsLocal.raceCtx = racegostart(abi.FuncPCABIInternal((*timers).run) + sys.PCQuantum)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. src/runtime/atomic_pointer.go

    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname atomicwb
    //go:nosplit
    func atomicwb(ptr *unsafe.Pointer, new unsafe.Pointer) {
    	slot := (*uintptr)(unsafe.Pointer(ptr))
    	buf := getg().m.p.ptr().wbBuf.get2()
    	buf[0] = *slot
    	buf[1] = uintptr(new)
    }
    
    // atomicstorep performs *ptr = new atomically and invokes a write barrier.
    //
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. src/runtime/netpoll_windows.go

    func netpoll(delay int64) (gList, int32) {
    	if iocphandle == _INVALID_HANDLE_VALUE {
    		return gList{}, 0
    	}
    
    	var entries [64]overlappedEntry
    	var wait uint32
    	var toRun gList
    	mp := getg().m
    
    	if delay >= 1e15 {
    		// An arbitrary cap on how long to wait for a timer.
    		// 1e15 ns == ~11.5 days.
    		delay = 1e15
    	}
    
    	if delay > 0 && mp.waitIocpHandle != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. src/internal/trace/testdata/testprog/cpu-profile.go

    	}
    	// Examine the CPU profiler's view. Filter it to only include samples from
    	// the single test goroutine. Use labels to execute that filter: they should
    	// apply to all work done while that goroutine is getg().m.curg, and they
    	// should apply to no other goroutines.
    	pprofStacks := make(map[string]int)
    	for _, s := range prof.Sample {
    		if s.Label["tracing"] != nil {
    			var fns []string
    			var leaf string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. src/runtime/mgc.go

    			// mark using checkmark bits, to check that we
    			// didn't forget to mark anything during the
    			// concurrent mark process.
    			startCheckmarks()
    			gcResetMarkState()
    			gcw := &getg().m.p.ptr().gcw
    			gcDrain(gcw, 0)
    			wbBufFlush1(getg().m.p.ptr())
    			gcw.dispose()
    			endCheckmarks()
    		}
    
    		// marking is complete so we can turn the write barrier off
    		setGCPhase(_GCoff)
    		stwSwept = gcSweep(work.mode)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62K bytes
    - Viewed (0)
  7. src/runtime/sema.go

    func semacquire(addr *uint32) {
    	semacquire1(addr, false, 0, 0, waitReasonSemacquire)
    }
    
    func semacquire1(addr *uint32, lifo bool, profile semaProfileFlags, skipframes int, reason waitReason) {
    	gp := getg()
    	if gp != gp.m.curg {
    		throw("semacquire not on the G stack")
    	}
    
    	// Easy case.
    	if cansemacquire(addr) {
    		return
    	}
    
    	// Harder case:
    	//	increment waiter count
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. src/runtime/checkptr.go

    //   - github.com/bytedance/sonic
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname checkptrBase
    func checkptrBase(p unsafe.Pointer) uintptr {
    	// stack
    	if gp := getg(); gp.stack.lo <= uintptr(p) && uintptr(p) < gp.stack.hi {
    		// TODO(mdempsky): Walk the stack to identify the
    		// specific stack frame or even stack object that p
    		// points into.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. src/runtime/os_netbsd.go

    		return int(osrev)
    	}
    	return 0
    }
    
    //go:nosplit
    func semacreate(mp *m) {
    }
    
    //go:nosplit
    func semasleep(ns int64) int32 {
    	gp := getg()
    	var deadline int64
    	if ns >= 0 {
    		deadline = nanotime() + ns
    	}
    
    	for {
    		v := atomic.Load(&gp.m.waitsemacount)
    		if v > 0 {
    			if atomic.Cas(&gp.m.waitsemacount, v, v-1) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. src/runtime/traceback.go

    			return
    		}
    		print("\n")
    		goroutineheader(gp)
    		// Note: gp.m == getg().m occurs when tracebackothers is called
    		// from a signal handler initiated during a systemstack call.
    		// The original G is still in the running state, and we want to
    		// print its stack.
    		if gp.m != getg().m && readgstatus(gp)&^_Gscan == _Grunning {
    			print("\tgoroutine running on other thread; stack unavailable\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
Back to top