Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 609 for getg (0.05 sec)

  1. src/runtime/os_darwin.go

    		minitSignalStack()
    	}
    	minitSignalMask()
    	getg().m.procid = uint64(pthread_self())
    }
    
    // Called from dropm to undo the effect of an minit.
    //
    //go:nosplit
    func unminit() {
    	// iOS does not support alternate signal stack.
    	// See minit.
    	if !(GOOS == "ios" && GOARCH == "arm64") {
    		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.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/runtime/os3_plan9.go

    	"internal/goarch"
    	"internal/stringslite"
    	"unsafe"
    )
    
    // May run during STW, so write barriers are not allowed.
    //
    //go:nowritebarrierrec
    func sighandler(_ureg *ureg, note *byte, gp *g) int {
    	gsignal := getg()
    	mp := gsignal.m
    
    	var t sigTabT
    	var docrash bool
    	var sig int
    	var flags int
    	var level int32
    
    	c := &sigctxt{_ureg}
    	notestr := gostringnocopy(note)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. src/runtime/export_debuglog_test.go

    func (l *dlogger) P(x any) *dlogger      { return l.p(x) }
    func (l *dlogger) S(x string) *dlogger   { return l.s(x) }
    func (l *dlogger) PC(x uintptr) *dlogger { return l.pc(x) }
    
    func DumpDebugLog() string {
    	gp := getg()
    	gp.writebuf = make([]byte, 0, 1<<20)
    	printDebugLog()
    	buf := gp.writebuf
    	gp.writebuf = nil
    
    	return string(buf)
    }
    
    func ResetDebugLog() {
    	stw := stopTheWorld(stwForTestResetDebugLog)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 16:49:45 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. src/runtime/msan.go

    // anyhow for values on the stack. Just ignore msanread when running
    // on the system stack. The other msan functions are fine.
    //
    //go:linkname msanread
    //go:nosplit
    func msanread(addr unsafe.Pointer, sz uintptr) {
    	gp := getg()
    	if gp == nil || gp.m == nil || gp == gp.m.g0 || gp == gp.m.gsignal {
    		return
    	}
    	domsanread(addr, sz)
    }
    
    //go:noescape
    func domsanread(addr unsafe.Pointer, sz uintptr)
    
    //go:linkname msanwrite
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 20:50:21 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. src/runtime/rwmutex.go

    			lock(&rw.rLock)
    			if rw.readerPass > 0 {
    				// Writer finished.
    				rw.readerPass -= 1
    				unlock(&rw.rLock)
    			} else {
    				// Queue this reader to be woken by
    				// the writer.
    				m := getg().m
    				m.schedlink = rw.readers
    				rw.readers.set(m)
    				unlock(&rw.rLock)
    				notesleep(&m.park)
    				noteclear(&m.park)
    			}
    		})
    	}
    }
    
    // runlock undoes a single rlock call on rw.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 5K bytes
    - Viewed (0)
  8. src/runtime/debug_test.go

    		debug.SetGCPercent(ogcpercent)
    	}
    }
    
    func debugCallWorker(ready chan<- *runtime.G, stop *uint32, done chan<- error) {
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    
    	ready <- runtime.Getg()
    
    	x := 2
    	debugCallWorker2(stop, &x)
    	if x != 1 {
    		done <- fmt.Errorf("want x = 2, got %d; register pointer not adjusted?", x)
    	}
    	close(done)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 15:08:04 UTC 2023
    - 8K bytes
    - Viewed (0)
  9. 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)
  10. src/runtime/mgcmark.go

    // This must be called with preemption enabled.
    func gcAssistAlloc(gp *g) {
    	// Don't assist in non-preemptible contexts. These are
    	// generally fragile and won't allow the assist to block.
    	if getg() == gp.m.g0 {
    		return
    	}
    	if mp := getg().m; mp.locks > 0 || mp.preemptoff != "" {
    		return
    	}
    
    	// This extremely verbose boolean indicates whether we've
    	// entered mark assist from the perspective of the tracer.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
Back to top