Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 242 for getg (0.6 sec)

  1. src/runtime/signal_unix.go

    		// it may hit stack split that is not expected here.
    		if gp != nil {
    			setg(nil)
    		}
    		badsignal(uintptr(sig), c)
    		// Restore g
    		if gp != nil {
    			setg(gp)
    		}
    		return
    	}
    
    	setg(gp.m.gsignal)
    
    	// If some non-Go code called sigaltstack, adjust.
    	var gsignalStack gsignalStack
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 16:04:54 UTC 2024
    - 45K bytes
    - Viewed (0)
  2. src/runtime/panic.go

    	if goarch.IsWasm == 0 && stringslite.HasPrefix(funcname(findfunc(pc)), "runtime.") {
    		// Note: wasm can't tail call, so we can't get the original caller's pc.
    		throw(msg)
    	}
    	// TODO: is this redundant? How could we be in malloc
    	// but not in the runtime? runtime/internal/*, maybe?
    	gp := getg()
    	if gp != nil && gp.m != nil && gp.m.mallocing != 0 {
    		throw(msg)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  3. src/runtime/stack.go

    	}
    	if s := readgstatus(gp); s&_Gscan == 0 {
    		// We don't own the stack via _Gscan. We could still
    		// own it if this is our own user G and we're on the
    		// system stack.
    		if !(gp == getg().m.curg && getg() != getg().m.curg && s == _Grunning) {
    			// We don't own the stack.
    			throw("bad status in shrinkstack")
    		}
    	}
    	if !isShrinkStackSafe(gp) {
    		throw("shrinkstack at bad time")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  4. src/runtime/os_linux.go

    	// procid. We need this for asynchronous preemption and it's
    	// useful in debuggers.
    	getg().m.procid = uint64(gettid())
    }
    
    // Called from dropm to undo the effect of an minit.
    //
    //go:nosplit
    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
    - 25.9K bytes
    - Viewed (0)
  5. src/runtime/os_freebsd.go

    	// FreeBSD users are running a patched kernel. See issue #15658.
    	if gp := getg(); !isarchive && !islibrary && gp.m == &m0 && gp == gp.m.g0 {
    		st := stackt{ss_flags: _SS_DISABLE}
    		sigaltstack(&st, nil)
    	}
    
    	minitSignals()
    }
    
    // Called from dropm to undo the effect of an minit.
    //
    //go:nosplit
    func unminit() {
    	unminitSignals()
    	getg().m.procid = 0
    }
    
    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/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)
  7. 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)
  8. 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)
  9. 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)
  10. src/runtime/cgocall.go

    }
    
    func cgocallbackg1(fn, frame unsafe.Pointer, ctxt uintptr) {
    	gp := getg()
    
    	if gp.m.needextram || extraMWaiters.Load() > 0 {
    		gp.m.needextram = false
    		systemstack(newextram)
    	}
    
    	if ctxt != 0 {
    		s := append(gp.cgoCtxt, ctxt)
    
    		// Now we need to set gp.cgoCtxt = s, but we could get
    		// a SIGPROF signal while manipulating the slice, and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
Back to top