- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 274 for getg (0.16 sec)
-
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) -
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) -
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) -
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) -
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) -
src/runtime/sys_libc.go
// Preserves the calling point as the location where a profiler traceback will begin. // //go:nosplit func libcCall(fn, arg unsafe.Pointer) int32 { // Leave caller's PC/SP/G around for traceback. gp := getg() var mp *m if gp != nil { mp = gp.m } if mp != nil && mp.libcallsp == 0 { mp.libcallg.set(gp) mp.libcallpc = getcallerpc() // sp must be the last, because once async cpu profiler finds
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:54:15 UTC 2022 - 1.8K bytes - Viewed (0) -
src/runtime/atomic_pointer.go
// 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 func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 4K bytes - Viewed (0) -
src/runtime/export_unix_test.go
func WaitForSigusr1(r, w int32, ready func(mp *M)) (int64, int64) { lockOSThread() // Make sure we can receive SIGUSR1. unblocksig(_SIGUSR1) waitForSigusr1.rdpipe = r waitForSigusr1.wrpipe = w mp := getg().m testSigusr1 = waitForSigusr1Callback ready(mp) // Wait for the signal. We use a pipe rather than a note // because write is always async-signal-safe. entersyscallblock() var b byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 20 21:27:51 UTC 2023 - 2.3K bytes - Viewed (0) -
src/runtime/os_dragonfly.go
// Called to initialize a new m (including the bootstrap m). // Called on the new thread, cannot allocate memory. func minit() { getg().m.procid = uint64(lwp_gettid()) minitSignals() } // 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: Tue Dec 05 20:34:30 UTC 2023 - 7.1K bytes - Viewed (0) -
src/runtime/mcheckmark.go
print("runtime: found obj at *(", hex(base), "+", hex(off), ")\n") // Dump the source (base) object gcDumpObject("base", base, off) // Dump the object gcDumpObject("obj", obj, ^uintptr(0)) getg().m.traceback = 2 throw("checkmark found unmarked object") } ai := arenaIndex(obj) arena := mheap_.arenas[ai.l1()][ai.l2()] arenaWord := (obj / heapArenaBytes / 8) % uintptr(len(arena.checkmarks.b))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 2.8K bytes - Viewed (0)