Skip to main content

Module runtime

Module runtime 

Source
Expand description

Goroutine scheduler internals.

Ported from src/runtime/ in https://github.com/golang/go. Each submodule maps to the Go source file(s) shown below.

§v2.0 additions

New module / symbolPurpose
stacknewstack, copystack, sigsegv_handlerDynamic goroutine stack growth (Step 3)
mpthread_id, setup_sigaltstackPer-M thread ID + 64 KiB alternate signal stack (Step 4)
schedasync_preempt2, sigurg_handlerNon-cooperative goroutine preemption via SIGURG (Step 4)
asm_amd64/asm_arm64async_preempt_trampolineSave/restore all registers around the preemption yield (Step 4)
sysmonpthread_kill(SIGURG) in preemptoneSignal delivery for async preemption (Step 4)
netpollepoll (Linux) / kqueue (macOS) fd-readiness backend (Step 5)
This moduleGo source
gruntime/runtime2.go
mruntime/runtime2.go, runtime/proc.go
pruntime/runtime2.go, runtime/proc.go
schedruntime/proc.go, runtime/preempt.go
stackruntime/stack.go, runtime/signal_unix.go
netpollruntime/netpoll_epoll.go, runtime/netpoll_kqueue.go
parkruntime/proc.go (gopark / goready)
sudogruntime/runtime2.go, runtime/proc.go
syscallruntime/proc.go (entersyscall / exitsyscall)
sysmonruntime/proc.go (sysmon / retake)
timeruntime/time.go
asm_amd64runtime/asm_amd64.s, runtime/preempt_amd64.s
asm_arm64runtime/asm_arm64.s, runtime/preempt_arm64.s