X7ROOT File Manager
Current Path:
/opt/golang/1.22.0/src/runtime
opt
/
golang
/
1.22.0
/
src
/
runtime
/
馃搧
..
馃搫
HACKING.md
(13.85 KB)
馃搫
Makefile
(178 B)
馃搫
abi_test.go
(2.83 KB)
馃搫
alg.go
(10.99 KB)
馃搫
align_runtime_test.go
(1.82 KB)
馃搫
align_test.go
(5.37 KB)
馃搫
arena.go
(31.66 KB)
馃搫
arena_test.go
(13.39 KB)
馃搧
asan
馃搫
asan.go
(1.55 KB)
馃搫
asan0.go
(760 B)
馃搫
asan_amd64.s
(2.45 KB)
馃搫
asan_arm64.s
(2.14 KB)
馃搫
asan_loong64.s
(2.12 KB)
馃搫
asan_ppc64le.s
(2.75 KB)
馃搫
asan_riscv64.s
(1.92 KB)
馃搫
asm.s
(719 B)
馃搫
asm_386.s
(42.54 KB)
馃搫
asm_amd64.h
(631 B)
馃搫
asm_amd64.s
(60.09 KB)
馃搫
asm_arm.s
(31.58 KB)
馃搫
asm_arm64.s
(43.33 KB)
馃搫
asm_loong64.s
(27.58 KB)
馃搫
asm_mips64x.s
(24.34 KB)
馃搫
asm_mipsx.s
(25.82 KB)
馃搫
asm_ppc64x.h
(1.93 KB)
馃搫
asm_ppc64x.s
(45.19 KB)
馃搫
asm_riscv64.s
(26.97 KB)
馃搫
asm_s390x.s
(27.55 KB)
馃搫
asm_wasm.s
(11.82 KB)
馃搫
atomic_arm64.s
(259 B)
馃搫
atomic_loong64.s
(245 B)
馃搫
atomic_mips64x.s
(300 B)
馃搫
atomic_mipsx.s
(262 B)
馃搫
atomic_pointer.go
(3.66 KB)
馃搫
atomic_ppc64x.s
(437 B)
馃搫
atomic_riscv64.s
(275 B)
馃搫
auxv_none.go
(298 B)
馃搫
callers_test.go
(12.13 KB)
馃搧
cgo
馃搫
cgo.go
(2.5 KB)
馃搫
cgo_mmap.go
(2.42 KB)
馃搫
cgo_ppc64x.go
(418 B)
馃搫
cgo_sigaction.go
(3.28 KB)
馃搫
cgocall.go
(23.23 KB)
馃搫
cgocallback.go
(317 B)
馃搫
cgocheck.go
(7.97 KB)
馃搫
chan.go
(23.74 KB)
馃搫
chan_test.go
(23.44 KB)
馃搫
chanbarrier_test.go
(1.4 KB)
馃搫
checkptr.go
(3.29 KB)
馃搫
checkptr_test.go
(2.86 KB)
馃搫
closure_test.go
(937 B)
馃搫
compiler.go
(410 B)
馃搫
complex.go
(1.59 KB)
馃搫
complex_test.go
(1.05 KB)
馃搫
conv_wasm_test.go
(2.96 KB)
馃搫
coro.go
(4.92 KB)
馃搧
coverage
馃搫
covercounter.go
(749 B)
馃搫
covermeta.go
(2.4 KB)
馃搫
cpuflags.go
(810 B)
馃搫
cpuflags_amd64.go
(533 B)
馃搫
cpuflags_arm64.go
(312 B)
馃搫
cpuprof.go
(7.94 KB)
馃搫
cputicks.go
(437 B)
馃搫
crash_cgo_test.go
(23.35 KB)
馃搫
crash_test.go
(23.12 KB)
馃搫
crash_unix_test.go
(9.19 KB)
馃搫
create_file_nounix.go
(305 B)
馃搫
create_file_unix.go
(368 B)
馃搧
debug
馃搫
debug.go
(3.53 KB)
馃搫
debug_test.go
(7.99 KB)
馃搫
debugcall.go
(6.75 KB)
馃搫
debuglog.go
(18.24 KB)
馃搫
debuglog_off.go
(357 B)
馃搫
debuglog_on.go
(1.09 KB)
馃搫
debuglog_test.go
(4.9 KB)
馃搫
defer_test.go
(11.4 KB)
馃搫
defs1_linux.go
(845 B)
馃搫
defs1_netbsd_386.go
(2.91 KB)
馃搫
defs1_netbsd_amd64.go
(3.14 KB)
馃搫
defs1_netbsd_arm.go
(3.03 KB)
馃搫
defs1_netbsd_arm64.go
(3.25 KB)
馃搫
defs1_solaris_amd64.go
(4.01 KB)
馃搫
defs2_linux.go
(3.22 KB)
馃搫
defs3_linux.go
(1.09 KB)
馃搫
defs_aix.go
(4.17 KB)
馃搫
defs_aix_ppc64.go
(3.63 KB)
馃搫
defs_arm_linux.go
(2.67 KB)
馃搫
defs_darwin.go
(4.18 KB)
馃搫
defs_darwin_amd64.go
(6.34 KB)
馃搫
defs_darwin_arm64.go
(4.17 KB)
馃搫
defs_dragonfly.go
(2.73 KB)
馃搫
defs_dragonfly_amd64.go
(3.41 KB)
馃搫
defs_freebsd.go
(3.96 KB)
馃搫
defs_freebsd_386.go
(4.52 KB)
馃搫
defs_freebsd_amd64.go
(4.79 KB)
馃搫
defs_freebsd_arm.go
(3.92 KB)
馃搫
defs_freebsd_arm64.go
(4.18 KB)
馃搫
defs_freebsd_riscv64.go
(4.19 KB)
馃搫
defs_illumos_amd64.go
(285 B)
馃搫
defs_linux.go
(2.92 KB)
馃搫
defs_linux_386.go
(4.2 KB)
馃搫
defs_linux_amd64.go
(4.7 KB)
馃搫
defs_linux_arm.go
(3.89 KB)
馃搫
defs_linux_arm64.go
(3.62 KB)
馃搫
defs_linux_loong64.go
(3.43 KB)
馃搫
defs_linux_mips64x.go
(3.6 KB)
馃搫
defs_linux_mipsx.go
(3.6 KB)
馃搫
defs_linux_ppc64.go
(3.69 KB)
馃搫
defs_linux_ppc64le.go
(3.69 KB)
馃搫
defs_linux_riscv64.go
(3.81 KB)
馃搫
defs_linux_s390x.go
(3.16 KB)
馃搫
defs_netbsd.go
(2.83 KB)
馃搫
defs_netbsd_386.go
(855 B)
馃搫
defs_netbsd_amd64.go
(1.01 KB)
馃搫
defs_netbsd_arm.go
(764 B)
馃搫
defs_openbsd.go
(3.06 KB)
馃搫
defs_openbsd_386.go
(2.91 KB)
馃搫
defs_openbsd_amd64.go
(3.11 KB)
馃搫
defs_openbsd_arm.go
(3.03 KB)
馃搫
defs_openbsd_arm64.go
(2.78 KB)
馃搫
defs_openbsd_mips64.go
(2.75 KB)
馃搫
defs_openbsd_ppc64.go
(3 KB)
馃搫
defs_openbsd_riscv64.go
(2.89 KB)
馃搫
defs_plan9_386.go
(1.63 KB)
馃搫
defs_plan9_amd64.go
(1.82 KB)
馃搫
defs_plan9_arm.go
(1.73 KB)
馃搫
defs_solaris.go
(3.32 KB)
馃搫
defs_solaris_amd64.go
(1004 B)
馃搫
defs_windows.go
(2.25 KB)
馃搫
defs_windows_386.go
(2.28 KB)
馃搫
defs_windows_amd64.go
(3.19 KB)
馃搫
defs_windows_arm.go
(2.57 KB)
馃搫
defs_windows_arm64.go
(3.07 KB)
馃搫
duff_386.s
(8.24 KB)
馃搫
duff_amd64.s
(5.64 KB)
馃搫
duff_arm.s
(7.11 KB)
馃搫
duff_arm64.s
(5.27 KB)
馃搫
duff_loong64.s
(11.9 KB)
馃搫
duff_mips64x.s
(11.28 KB)
馃搫
duff_ppc64x.s
(7.06 KB)
馃搫
duff_riscv64.s
(11.4 KB)
馃搫
duff_s390x.s
(507 B)
馃搫
ehooks_test.go
(2.04 KB)
馃搫
env_plan9.go
(3 KB)
馃搫
env_posix.go
(1.56 KB)
馃搫
env_test.go
(1.16 KB)
馃搫
error.go
(9.29 KB)
馃搫
example_test.go
(1.55 KB)
馃搫
exithook.go
(2.32 KB)
馃搫
export_aix_test.go
(207 B)
馃搫
export_arm_test.go
(226 B)
馃搫
export_darwin_test.go
(207 B)
馃搫
export_debug_amd64_test.go
(3.6 KB)
馃搫
export_debug_arm64_test.go
(3.49 KB)
馃搫
export_debug_ppc64le_test.go
(3.5 KB)
馃搫
export_debug_test.go
(5.07 KB)
馃搫
export_debuglog_test.go
(1.27 KB)
馃搫
export_linux_test.go
(378 B)
馃搫
export_mmap_test.go
(429 B)
馃搫
export_pipe2_test.go
(310 B)
馃搫
export_pipe_test.go
(219 B)
馃搫
export_test.go
(50.52 KB)
馃搫
export_unix_test.go
(2.27 KB)
馃搫
export_windows_test.go
(903 B)
馃搫
extern.go
(18.58 KB)
馃搫
fastlog2.go
(1.22 KB)
馃搫
fastlog2_test.go
(784 B)
馃搫
fastlog2table.go
(904 B)
馃搫
fds_nonunix.go
(256 B)
馃搫
fds_test.go
(1.43 KB)
馃搫
fds_unix.go
(1.27 KB)
馃搫
float.go
(1.35 KB)
馃搫
float_test.go
(699 B)
馃搫
funcdata.h
(2.53 KB)
馃搫
gc_test.go
(20.32 KB)
馃搫
gcinfo_test.go
(5.95 KB)
馃搫
go_tls.h
(366 B)
馃搫
hash32.go
(1.58 KB)
馃搫
hash64.go
(1.95 KB)
馃搫
hash_test.go
(17.24 KB)
馃搫
heap_test.go
(529 B)
馃搫
heapdump.go
(17.88 KB)
馃搫
histogram.go
(7.3 KB)
馃搫
histogram_test.go
(3.51 KB)
馃搫
iface.go
(20.92 KB)
馃搫
iface_test.go
(7.45 KB)
馃搫
import_test.go
(1.42 KB)
馃搫
importx_test.go
(763 B)
馃搧
internal
馃搫
lfstack.go
(2.03 KB)
馃搫
lfstack_test.go
(2.74 KB)
馃搫
libfuzzer.go
(6.34 KB)
馃搫
libfuzzer_amd64.s
(5.03 KB)
馃搫
libfuzzer_arm64.s
(3.15 KB)
馃搫
lock_futex.go
(5.4 KB)
馃搫
lock_js.go
(7.28 KB)
馃搫
lock_sema.go
(6.75 KB)
馃搫
lock_wasip1.go
(2.01 KB)
馃搫
lockrank.go
(18.19 KB)
馃搫
lockrank_off.go
(1.17 KB)
馃搫
lockrank_on.go
(10.27 KB)
馃搫
lockrank_test.go
(856 B)
馃搫
malloc.go
(58.5 KB)
馃搫
malloc_test.go
(10.64 KB)
馃搫
map.go
(52.17 KB)
馃搫
map_benchmark_test.go
(10.59 KB)
馃搫
map_fast32.go
(12.74 KB)
馃搫
map_fast64.go
(12.92 KB)
馃搫
map_faststr.go
(14.32 KB)
馃搫
map_test.go
(31.75 KB)
馃搫
mbarrier.go
(13.78 KB)
馃搫
mbitmap.go
(22.54 KB)
馃搫
mbitmap_allocheaders.go
(44.67 KB)
馃搫
mbitmap_noallocheaders.go
(28.95 KB)
馃搫
mcache.go
(10 KB)
馃搫
mcentral.go
(8.05 KB)
馃搫
mcheckmark.go
(2.85 KB)
馃搫
mem.go
(6.72 KB)
馃搫
mem_aix.go
(2.01 KB)
馃搫
mem_bsd.go
(2.21 KB)
馃搫
mem_darwin.go
(1.96 KB)
馃搫
mem_js.go
(457 B)
馃搫
mem_linux.go
(4.98 KB)
馃搫
mem_plan9.go
(447 B)
馃搫
mem_sbrk.go
(4.19 KB)
馃搫
mem_wasip1.go
(392 B)
馃搫
mem_wasm.go
(488 B)
馃搫
mem_windows.go
(3.88 KB)
馃搫
memclr_386.s
(2.38 KB)
馃搫
memclr_amd64.s
(4.91 KB)
馃搫
memclr_arm.s
(2.6 KB)
馃搫
memclr_arm64.s
(3.62 KB)
馃搫
memclr_loong64.s
(843 B)
馃搫
memclr_mips64x.s
(1.72 KB)
馃搫
memclr_mipsx.s
(1.32 KB)
馃搫
memclr_plan9_386.s
(983 B)
馃搫
memclr_plan9_amd64.s
(511 B)
馃搫
memclr_ppc64x.s
(4.44 KB)
馃搫
memclr_riscv64.s
(1.71 KB)
馃搫
memclr_s390x.s
(1.96 KB)
馃搫
memclr_wasm.s
(485 B)
馃搫
memmove_386.s
(4.42 KB)
馃搫
memmove_amd64.s
(12.48 KB)
馃搫
memmove_arm.s
(5.9 KB)
馃搫
memmove_arm64.s
(5.96 KB)
馃搫
memmove_linux_amd64_test.go
(1.53 KB)
馃搫
memmove_loong64.s
(1.87 KB)
馃搫
memmove_mips64x.s
(1.83 KB)
馃搫
memmove_mipsx.s
(4.4 KB)
馃搫
memmove_plan9_386.s
(3.06 KB)
馃搫
memmove_plan9_amd64.s
(3.04 KB)
馃搫
memmove_ppc64x.s
(4.91 KB)
馃搫
memmove_riscv64.s
(5.46 KB)
馃搫
memmove_s390x.s
(2.92 KB)
馃搫
memmove_test.go
(21.23 KB)
馃搫
memmove_wasm.s
(479 B)
馃搧
metrics
馃搫
metrics.go
(26.01 KB)
馃搫
metrics_test.go
(42.46 KB)
馃搫
mfinal.go
(18.91 KB)
馃搫
mfinal_test.go
(5.57 KB)
馃搫
mfixalloc.go
(3.13 KB)
馃搫
mgc.go
(59.29 KB)
馃搫
mgclimit.go
(17.28 KB)
馃搫
mgclimit_test.go
(9.02 KB)
馃搫
mgcmark.go
(53.07 KB)
馃搫
mgcpacer.go
(55.36 KB)
馃搫
mgcpacer_test.go
(39.26 KB)
馃搫
mgcscavenge.go
(52.32 KB)
馃搫
mgcscavenge_test.go
(25.2 KB)
馃搫
mgcstack.go
(10.58 KB)
馃搫
mgcsweep.go
(32.26 KB)
馃搫
mgcwork.go
(12.89 KB)
馃搫
mheap.go
(72.64 KB)
馃搫
minmax.go
(1.46 KB)
馃搫
minmax_test.go
(3.31 KB)
馃搫
mkduff.go
(8.04 KB)
馃搫
mkfastlog2table.go
(3.08 KB)
馃搫
mklockrank.go
(9 KB)
馃搫
mkpreempt.go
(15.33 KB)
馃搫
mksizeclasses.go
(9.52 KB)
馃搫
mmap.go
(844 B)
馃搫
mpagealloc.go
(39.23 KB)
馃搫
mpagealloc_32bit.go
(4.56 KB)
馃搫
mpagealloc_64bit.go
(9.34 KB)
馃搫
mpagealloc_test.go
(32.59 KB)
馃搫
mpagecache.go
(5.59 KB)
馃搫
mpagecache_test.go
(10.79 KB)
馃搫
mpallocbits.go
(12.58 KB)
馃搫
mpallocbits_test.go
(13.69 KB)
馃搫
mprof.go
(47.4 KB)
馃搫
mranges.go
(14.46 KB)
馃搫
mranges_test.go
(5.68 KB)
馃搧
msan
馃搫
msan.go
(1.5 KB)
馃搫
msan0.go
(725 B)
馃搫
msan_amd64.s
(2.3 KB)
馃搫
msan_arm64.s
(1.98 KB)
馃搫
msan_loong64.s
(1.96 KB)
馃搫
msize_allocheaders.go
(1.32 KB)
馃搫
msize_noallocheaders.go
(915 B)
馃搫
mspanset.go
(13.12 KB)
馃搫
mstats.go
(33.81 KB)
馃搫
mwbbuf.go
(8.13 KB)
馃搫
nbpipe_pipe.go
(405 B)
馃搫
nbpipe_pipe2.go
(344 B)
馃搫
nbpipe_pipe_test.go
(706 B)
馃搫
nbpipe_test.go
(1.99 KB)
馃搫
net_plan9.go
(645 B)
馃搫
netpoll.go
(20.55 KB)
馃搫
netpoll_aix.go
(5.06 KB)
馃搫
netpoll_epoll.go
(4.4 KB)
馃搫
netpoll_fake.go
(664 B)
馃搫
netpoll_kqueue.go
(5.62 KB)
馃搫
netpoll_os_test.go
(520 B)
馃搫
netpoll_solaris.go
(11.2 KB)
馃搫
netpoll_stub.go
(1.48 KB)
馃搫
netpoll_wasip1.go
(6.08 KB)
馃搫
netpoll_windows.go
(4.01 KB)
馃搫
nonwindows_stub.go
(729 B)
馃搫
norace_linux_test.go
(915 B)
馃搫
norace_test.go
(983 B)
馃搫
numcpu_freebsd_test.go
(381 B)
馃搫
os2_aix.go
(20.88 KB)
馃搫
os2_freebsd.go
(302 B)
馃搫
os2_openbsd.go
(296 B)
馃搫
os2_plan9.go
(1.48 KB)
馃搫
os2_solaris.go
(320 B)
馃搫
os3_plan9.go
(3.94 KB)
馃搫
os3_solaris.go
(17.59 KB)
馃搫
os_aix.go
(8.89 KB)
馃搫
os_android.go
(463 B)
馃搫
os_darwin.go
(11.92 KB)
馃搫
os_darwin_arm64.go
(329 B)
馃搫
os_dragonfly.go
(7.14 KB)
馃搫
os_freebsd.go
(11.64 KB)
馃搫
os_freebsd2.go
(603 B)
馃搫
os_freebsd_amd64.go
(658 B)
馃搫
os_freebsd_arm.go
(1.45 KB)
馃搫
os_freebsd_arm64.go
(320 B)
馃搫
os_freebsd_noauxv.go
(241 B)
馃搫
os_freebsd_riscv64.go
(198 B)
馃搫
os_illumos.go
(3.93 KB)
馃搫
os_js.go
(767 B)
馃搫
os_linux.go
(25.71 KB)
馃搫
os_linux_arm.go
(1.51 KB)
馃搫
os_linux_arm64.go
(478 B)
馃搫
os_linux_be64.go
(806 B)
馃搫
os_linux_generic.go
(870 B)
馃搫
os_linux_loong64.go
(263 B)
馃搫
os_linux_mips64x.go
(996 B)
馃搫
os_linux_mipsx.go
(987 B)
馃搫
os_linux_noauxv.go
(337 B)
馃搫
os_linux_novdso.go
(347 B)
馃搫
os_linux_ppc64x.go
(526 B)
馃搫
os_linux_riscv64.go
(198 B)
馃搫
os_linux_s390x.go
(825 B)
馃搫
os_linux_x86.go
(234 B)
馃搫
os_netbsd.go
(10.12 KB)
馃搫
os_netbsd_386.go
(617 B)
馃搫
os_netbsd_amd64.go
(614 B)
馃搫
os_netbsd_arm.go
(1.07 KB)
馃搫
os_netbsd_arm64.go
(769 B)
馃搫
os_nonopenbsd.go
(437 B)
馃搫
os_only_solaris.go
(357 B)
馃搫
os_openbsd.go
(6.23 KB)
馃搫
os_openbsd_arm.go
(662 B)
馃搫
os_openbsd_arm64.go
(329 B)
馃搫
os_openbsd_libc.go
(1.49 KB)
馃搫
os_openbsd_mips64.go
(329 B)
馃搫
os_openbsd_syscall.go
(1.36 KB)
馃搫
os_openbsd_syscall1.go
(441 B)
馃搫
os_openbsd_syscall2.go
(2.51 KB)
馃搫
os_plan9.go
(10.18 KB)
馃搫
os_plan9_arm.go
(375 B)
馃搫
os_solaris.go
(6.62 KB)
馃搫
os_unix.go
(436 B)
馃搫
os_unix_nonlinux.go
(374 B)
馃搫
os_wasip1.go
(7 KB)
馃搫
os_wasm.go
(3.15 KB)
馃搫
os_windows.go
(41.39 KB)
馃搫
os_windows_arm.go
(511 B)
馃搫
os_windows_arm64.go
(339 B)
馃搫
pagetrace_off.go
(550 B)
馃搫
pagetrace_on.go
(10.36 KB)
馃搫
panic.go
(41.85 KB)
馃搫
panic32.go
(4.8 KB)
馃搫
panic_test.go
(1.71 KB)
馃搫
panicnil_test.go
(1.25 KB)
馃搫
pinner.go
(10.98 KB)
馃搫
pinner_test.go
(11.04 KB)
馃搫
plugin.go
(4.37 KB)
馃搧
pprof
馃搫
preempt.go
(15.03 KB)
馃搫
preempt_386.s
(824 B)
馃搫
preempt_amd64.s
(1.67 KB)
馃搫
preempt_arm.s
(1.49 KB)
馃搫
preempt_arm64.s
(1.97 KB)
馃搫
preempt_loong64.s
(2.41 KB)
馃搫
preempt_mips64x.s
(2.72 KB)
馃搫
preempt_mipsx.s
(2.68 KB)
馃搫
preempt_nonwindows.go
(290 B)
馃搫
preempt_ppc64x.s
(2.72 KB)
馃搫
preempt_riscv64.s
(2.26 KB)
馃搫
preempt_s390x.s
(1.01 KB)
馃搫
preempt_wasm.s
(176 B)
馃搫
print.go
(5.92 KB)
馃搫
proc.go
(204.28 KB)
馃搫
proc_runtime_test.go
(1.38 KB)
馃搫
proc_test.go
(25.85 KB)
馃搫
profbuf.go
(18.26 KB)
馃搫
profbuf_test.go
(8.54 KB)
馃搫
proflabel.go
(1.52 KB)
馃搧
race
馃搫
race.go
(18.81 KB)
馃搫
race0.go
(2.79 KB)
馃搫
race_amd64.s
(13.94 KB)
馃搫
race_arm64.s
(14.21 KB)
馃搫
race_ppc64le.s
(15.93 KB)
馃搫
race_s390x.s
(11.99 KB)
馃搫
rand.go
(7.11 KB)
馃搫
rand_test.go
(1.95 KB)
馃搫
rdebug.go
(550 B)
馃搫
retry.go
(760 B)
馃搫
rt0_aix_ppc64.s
(4.09 KB)
馃搫
rt0_android_386.s
(822 B)
馃搫
rt0_android_amd64.s
(754 B)
馃搫
rt0_android_arm.s
(843 B)
馃搫
rt0_android_arm64.s
(941 B)
馃搫
rt0_darwin_amd64.s
(399 B)
馃搫
rt0_darwin_arm64.s
(1.69 KB)
馃搫
rt0_dragonfly_amd64.s
(448 B)
馃搫
rt0_freebsd_386.s
(454 B)
馃搫
rt0_freebsd_amd64.s
(442 B)
馃搫
rt0_freebsd_arm.s
(298 B)
馃搫
rt0_freebsd_arm64.s
(1.88 KB)
馃搫
rt0_freebsd_riscv64.s
(2.72 KB)
馃搫
rt0_illumos_amd64.s
(311 B)
馃搫
rt0_ios_amd64.s
(425 B)
馃搫
rt0_ios_arm64.s
(425 B)
馃搫
rt0_js_wasm.s
(1.53 KB)
馃搫
rt0_linux_386.s
(450 B)
馃搫
rt0_linux_amd64.s
(307 B)
馃搫
rt0_linux_arm.s
(1007 B)
馃搫
rt0_linux_arm64.s
(1.81 KB)
馃搫
rt0_linux_loong64.s
(2.01 KB)
馃搫
rt0_linux_mips64x.s
(1014 B)
馃搫
rt0_linux_mipsx.s
(797 B)
馃搫
rt0_linux_ppc64.s
(847 B)
馃搫
rt0_linux_ppc64le.s
(2.89 KB)
馃搫
rt0_linux_riscv64.s
(2.65 KB)
馃搫
rt0_linux_s390x.s
(676 B)
馃搫
rt0_netbsd_386.s
(452 B)
馃搫
rt0_netbsd_amd64.s
(309 B)
馃搫
rt0_netbsd_arm.s
(296 B)
馃搫
rt0_netbsd_arm64.s
(1.8 KB)
馃搫
rt0_openbsd_386.s
(454 B)
馃搫
rt0_openbsd_amd64.s
(311 B)
馃搫
rt0_openbsd_arm.s
(298 B)
馃搫
rt0_openbsd_arm64.s
(1.96 KB)
馃搫
rt0_openbsd_mips64.s
(976 B)
馃搫
rt0_openbsd_ppc64.s
(370 B)
馃搫
rt0_openbsd_riscv64.s
(372 B)
馃搫
rt0_plan9_386.s
(523 B)
馃搫
rt0_plan9_amd64.s
(481 B)
馃搫
rt0_plan9_arm.s
(397 B)
馃搫
rt0_solaris_amd64.s
(311 B)
馃搫
rt0_wasip1_wasm.s
(387 B)
馃搫
rt0_windows_386.s
(1.28 KB)
馃搫
rt0_windows_amd64.s
(1.14 KB)
馃搫
rt0_windows_arm.s
(386 B)
馃搫
rt0_windows_arm64.s
(733 B)
馃搫
runtime-gdb.py
(15.44 KB)
馃搫
runtime-gdb_test.go
(24.04 KB)
馃搫
runtime-gdb_unix_test.go
(9.4 KB)
馃搫
runtime-lldb_test.go
(4.95 KB)
馃搫
runtime-seh_windows_test.go
(4.7 KB)
馃搫
runtime.go
(7.1 KB)
馃搫
runtime1.go
(16.66 KB)
馃搫
runtime2.go
(46.16 KB)
馃搫
runtime_boring.go
(606 B)
馃搫
runtime_linux_test.go
(1.77 KB)
馃搫
runtime_mmap_test.go
(1.77 KB)
馃搫
runtime_test.go
(11.81 KB)
馃搫
runtime_unix_test.go
(1.22 KB)
馃搫
rwmutex.go
(5 KB)
馃搫
rwmutex_test.go
(4.21 KB)
馃搫
security_aix.go
(449 B)
馃搫
security_issetugid.go
(502 B)
馃搫
security_linux.go
(335 B)
馃搫
security_nonunix.go
(256 B)
馃搫
security_test.go
(4.09 KB)
馃搫
security_unix.go
(818 B)
馃搫
select.go
(14.82 KB)
馃搫
sema.go
(18.43 KB)
馃搫
sema_test.go
(4.21 KB)
馃搫
semasleep_test.go
(3.46 KB)
馃搫
sigaction.go
(489 B)
馃搫
signal_386.go
(1.72 KB)
馃搫
signal_aix_ppc64.go
(3.54 KB)
馃搫
signal_amd64.go
(2.73 KB)
馃搫
signal_arm.go
(2.54 KB)
馃搫
signal_arm64.go
(3.83 KB)
馃搫
signal_darwin.go
(2.13 KB)
馃搫
signal_darwin_amd64.go
(4 KB)
馃搫
signal_darwin_arm64.go
(3.6 KB)
馃搫
signal_dragonfly.go
(2.17 KB)
馃搫
signal_dragonfly_amd64.go
(2.01 KB)
馃搫
signal_freebsd.go
(2.2 KB)
馃搫
signal_freebsd_386.go
(1.55 KB)
馃搫
signal_freebsd_amd64.go
(2.03 KB)
馃搫
signal_freebsd_arm.go
(2.18 KB)
馃搫
signal_freebsd_arm64.go
(3.24 KB)
馃搫
signal_freebsd_riscv64.go
(3.08 KB)
馃搫
signal_linux_386.go
(1.59 KB)
馃搫
signal_linux_amd64.go
(2.05 KB)
馃搫
signal_linux_arm.go
(2.12 KB)
馃搫
signal_linux_arm64.go
(2.95 KB)
馃搫
signal_linux_loong64.go
(3.22 KB)
馃搫
signal_linux_mips64x.go
(3.35 KB)
馃搫
signal_linux_mipsx.go
(3.67 KB)
馃搫
signal_linux_ppc64x.go
(3.5 KB)
馃搫
signal_linux_riscv64.go
(2.92 KB)
馃搫
signal_linux_s390x.go
(4.49 KB)
馃搫
signal_loong64.go
(3.01 KB)
馃搫
signal_mips64x.go
(3.18 KB)
馃搫
signal_mipsx.go
(3.06 KB)
馃搫
signal_netbsd.go
(2.18 KB)
馃搫
signal_netbsd_386.go
(1.76 KB)
馃搫
signal_netbsd_amd64.go
(2.33 KB)
馃搫
signal_netbsd_arm.go
(2.3 KB)
馃搫
signal_netbsd_arm64.go
(3.4 KB)
馃搫
signal_openbsd.go
(2.18 KB)
馃搫
signal_openbsd_386.go
(1.58 KB)
馃搫
signal_openbsd_amd64.go
(2.04 KB)
馃搫
signal_openbsd_arm.go
(2.12 KB)
馃搫
signal_openbsd_arm64.go
(3.39 KB)
馃搫
signal_openbsd_mips64.go
(3.28 KB)
馃搫
signal_openbsd_ppc64.go
(3.53 KB)
馃搫
signal_openbsd_riscv64.go
(3.12 KB)
馃搫
signal_plan9.go
(1.93 KB)
馃搫
signal_ppc64x.go
(3.71 KB)
馃搫
signal_riscv64.go
(2.91 KB)
馃搫
signal_solaris.go
(4.5 KB)
馃搫
signal_solaris_amd64.go
(2.47 KB)
馃搫
signal_unix.go
(44.11 KB)
馃搫
signal_windows.go
(14.48 KB)
馃搫
signal_windows_test.go
(8.98 KB)
馃搫
sigqueue.go
(7.62 KB)
馃搫
sigqueue_note.go
(648 B)
馃搫
sigqueue_plan9.go
(3.25 KB)
馃搫
sigtab_aix.go
(11.3 KB)
馃搫
sigtab_linux_generic.go
(3.52 KB)
馃搫
sigtab_linux_mipsx.go
(5.95 KB)
馃搫
sizeclasses.go
(9.17 KB)
馃搫
sizeof_test.go
(1003 B)
馃搫
slice.go
(11.23 KB)
馃搫
slice_test.go
(10.32 KB)
馃搫
softfloat64.go
(11.54 KB)
馃搫
softfloat64_test.go
(4.04 KB)
馃搫
stack.go
(40.02 KB)
馃搫
stack_test.go
(23.14 KB)
馃搫
start_line_amd64_test.go
(647 B)
馃搫
start_line_test.go
(2.58 KB)
馃搫
stkframe.go
(9.88 KB)
馃搫
string.go
(13.35 KB)
馃搫
string_test.go
(13.33 KB)
馃搫
stubs.go
(17.39 KB)
馃搫
stubs2.go
(1.15 KB)
馃搫
stubs3.go
(324 B)
馃搫
stubs_386.go
(708 B)
馃搫
stubs_amd64.go
(1.38 KB)
馃搫
stubs_arm.go
(689 B)
馃搫
stubs_arm64.go
(700 B)
馃搫
stubs_linux.go
(650 B)
馃搫
stubs_loong64.go
(638 B)
馃搫
stubs_mips64x.go
(522 B)
馃搫
stubs_mipsx.go
(441 B)
馃搫
stubs_nonlinux.go
(298 B)
馃搫
stubs_ppc64.go
(302 B)
馃搫
stubs_ppc64x.go
(688 B)
馃搫
stubs_riscv64.go
(695 B)
馃搫
stubs_s390x.go
(414 B)
馃搫
symtab.go
(34.76 KB)
馃搫
symtab_test.go
(7.48 KB)
馃搫
symtabinl.go
(3.81 KB)
馃搫
symtabinl_test.go
(2.97 KB)
馃搫
sys_aix_ppc64.s
(7.42 KB)
馃搫
sys_arm.go
(521 B)
馃搫
sys_arm64.go
(469 B)
馃搫
sys_darwin.go
(22.56 KB)
馃搫
sys_darwin_amd64.s
(19.65 KB)
馃搫
sys_darwin_arm64.go
(1.74 KB)
馃搫
sys_darwin_arm64.s
(18.28 KB)
馃搫
sys_dragonfly_amd64.s
(8.31 KB)
馃搫
sys_freebsd_386.s
(9.41 KB)
馃搫
sys_freebsd_amd64.s
(12.67 KB)
馃搫
sys_freebsd_arm.s
(10.38 KB)
馃搫
sys_freebsd_arm64.s
(9.49 KB)
馃搫
sys_freebsd_riscv64.s
(8.92 KB)
馃搫
sys_libc.go
(1.84 KB)
馃搫
sys_linux_386.s
(17.89 KB)
馃搫
sys_linux_amd64.s
(15.74 KB)
馃搫
sys_linux_arm.s
(13.5 KB)
馃搫
sys_linux_arm64.s
(16.71 KB)
馃搫
sys_linux_loong64.s
(14.16 KB)
馃搫
sys_linux_mips64x.s
(11.96 KB)
馃搫
sys_linux_mipsx.s
(9.69 KB)
馃搫
sys_linux_ppc64x.s
(18.09 KB)
馃搫
sys_linux_riscv64.s
(11.48 KB)
馃搫
sys_linux_s390x.s
(12.49 KB)
馃搫
sys_loong64.go
(489 B)
馃搫
sys_mips64x.go
(500 B)
馃搫
sys_mipsx.go
(496 B)
馃搫
sys_netbsd_386.s
(9.61 KB)
馃搫
sys_netbsd_amd64.s
(9.78 KB)
馃搫
sys_netbsd_arm.s
(10.58 KB)
馃搫
sys_netbsd_arm64.s
(9.47 KB)
馃搫
sys_nonppc64x.go
(245 B)
馃搫
sys_openbsd.go
(2.59 KB)
馃搫
sys_openbsd1.go
(1.23 KB)
馃搫
sys_openbsd2.go
(8.67 KB)
馃搫
sys_openbsd3.go
(3.37 KB)
馃搫
sys_openbsd_386.s
(20.4 KB)
馃搫
sys_openbsd_amd64.s
(15.54 KB)
馃搫
sys_openbsd_arm.s
(18.46 KB)
馃搫
sys_openbsd_arm64.s
(15.05 KB)
馃搫
sys_openbsd_mips64.s
(8.81 KB)
馃搫
sys_openbsd_ppc64.s
(15.3 KB)
馃搫
sys_openbsd_riscv64.s
(16.8 KB)
馃搫
sys_plan9_386.s
(4.48 KB)
馃搫
sys_plan9_amd64.s
(4.56 KB)
馃搫
sys_plan9_arm.s
(7.03 KB)
馃搫
sys_ppc64x.go
(532 B)
馃搫
sys_riscv64.go
(469 B)
馃搫
sys_s390x.go
(469 B)
馃搫
sys_solaris_amd64.s
(6.42 KB)
馃搫
sys_wasm.go
(758 B)
馃搫
sys_wasm.s
(1.43 KB)
馃搫
sys_windows_386.s
(6.46 KB)
馃搫
sys_windows_amd64.s
(8.41 KB)
馃搫
sys_windows_arm.s
(7.72 KB)
馃搫
sys_windows_arm64.s
(6.8 KB)
馃搫
sys_x86.go
(552 B)
馃搫
syscall2_solaris.go
(1.85 KB)
馃搫
syscall_aix.go
(6.33 KB)
馃搫
syscall_solaris.go
(8.38 KB)
馃搫
syscall_unix_test.go
(635 B)
馃搫
syscall_windows.go
(16.57 KB)
馃搫
syscall_windows_test.go
(32.45 KB)
馃搫
tagptr.go
(496 B)
馃搫
tagptr_32bit.go
(927 B)
馃搫
tagptr_64bit.go
(3.23 KB)
馃搫
test_amd64.go
(196 B)
馃搫
test_amd64.s
(316 B)
馃搫
test_stubs.go
(218 B)
馃搧
testdata
馃搫
textflag.h
(1.47 KB)
馃搫
time.go
(30.57 KB)
馃搫
time_fake.go
(2.5 KB)
馃搫
time_linux_amd64.s
(2.02 KB)
馃搫
time_nofake.go
(709 B)
馃搫
time_test.go
(2.04 KB)
馃搫
time_windows.h
(753 B)
馃搫
time_windows_386.s
(1.71 KB)
馃搫
time_windows_amd64.s
(786 B)
馃搫
time_windows_arm.s
(1.97 KB)
馃搫
time_windows_arm64.s
(906 B)
馃搫
timeasm.go
(418 B)
馃搫
timestub.go
(532 B)
馃搫
timestub2.go
(363 B)
馃搫
tls_arm.s
(3.45 KB)
馃搫
tls_arm64.h
(1.1 KB)
馃搫
tls_arm64.s
(1.2 KB)
馃搫
tls_loong64.s
(589 B)
馃搫
tls_mips64x.s
(733 B)
馃搫
tls_mipsx.s
(710 B)
馃搫
tls_ppc64x.s
(1.52 KB)
馃搫
tls_riscv64.s
(615 B)
馃搫
tls_s390x.s
(1.55 KB)
馃搫
tls_stub.go
(260 B)
馃搫
tls_windows_amd64.go
(294 B)
馃搧
trace
馃搫
trace.go
(62.76 KB)
馃搫
trace2.go
(33.81 KB)
馃搫
trace2buf.go
(6.58 KB)
馃搫
trace2cpu.go
(8.87 KB)
馃搫
trace2event.go
(8.39 KB)
馃搫
trace2map.go
(4.36 KB)
馃搫
trace2region.go
(1.68 KB)
馃搫
trace2runtime.go
(24.2 KB)
馃搫
trace2stack.go
(9.45 KB)
馃搫
trace2status.go
(7.24 KB)
馃搫
trace2string.go
(2.59 KB)
馃搫
trace2time.go
(3.21 KB)
馃搫
trace_cgo_test.go
(4.47 KB)
馃搫
traceback.go
(54.61 KB)
馃搫
traceback_test.go
(22.95 KB)
馃搫
tracebackx_test.go
(509 B)
馃搫
type.go
(12.1 KB)
馃搫
typekind.go
(743 B)
馃搫
unsafe.go
(2.97 KB)
馃搫
unsafepoint_test.go
(3.27 KB)
馃搫
utf8.go
(3.39 KB)
馃搫
vdso_elf32.go
(2.76 KB)
馃搫
vdso_elf64.go
(2.84 KB)
馃搫
vdso_freebsd.go
(2.44 KB)
馃搫
vdso_freebsd_arm.go
(454 B)
馃搫
vdso_freebsd_arm64.go
(454 B)
馃搫
vdso_freebsd_riscv64.go
(429 B)
馃搫
vdso_freebsd_x86.go
(1.86 KB)
馃搫
vdso_in_none.go
(443 B)
馃搫
vdso_linux.go
(7.77 KB)
馃搫
vdso_linux_386.go
(669 B)
馃搫
vdso_linux_amd64.go
(685 B)
馃搫
vdso_linux_arm.go
(669 B)
馃搫
vdso_linux_arm64.go
(670 B)
馃搫
vdso_linux_loong64.go
(793 B)
馃搫
vdso_linux_mips64x.go
(850 B)
馃搫
vdso_linux_ppc64x.go
(672 B)
馃搫
vdso_linux_riscv64.go
(666 B)
馃搫
vdso_linux_s390x.go
(659 B)
馃搫
vdso_test.go
(3.71 KB)
馃搫
vlop_386.s
(2.02 KB)
馃搫
vlop_arm.s
(7.06 KB)
馃搫
vlop_arm_test.go
(3.75 KB)
馃搫
vlrt.go
(6.71 KB)
馃搫
wincallback.go
(3.45 KB)
馃搫
write_err.go
(291 B)
馃搫
write_err_android.go
(4.65 KB)
馃搫
zcallback_windows.go
(155 B)
馃搫
zcallback_windows.s
(63.06 KB)
馃搫
zcallback_windows_arm.s
(89.32 KB)
馃搫
zcallback_windows_arm64.s
(89.32 KB)
Editing: sys_linux_386.s
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // System calls and other sys.stuff for 386, Linux // #include "go_asm.h" #include "go_tls.h" #include "textflag.h" // Most linux systems use glibc's dynamic linker, which puts the // __kernel_vsyscall vdso helper at 0x10(GS) for easy access from position // independent code and setldt in runtime does the same in the statically // linked case. However, systems that use alternative libc such as Android's // bionic and musl, do not save the helper anywhere, and so the only way to // invoke a syscall from position independent code is boring old int $0x80 // (which is also what syscall wrappers in bionic/musl use). // // The benchmarks also showed that using int $0x80 is as fast as calling // *%gs:0x10 except on AMD Opteron. See https://golang.org/cl/19833 // for the benchmark program and raw data. //#define INVOKE_SYSCALL CALL 0x10(GS) // non-portable #define INVOKE_SYSCALL INT $0x80 #define SYS_exit 1 #define SYS_read 3 #define SYS_write 4 #define SYS_open 5 #define SYS_close 6 #define SYS_getpid 20 #define SYS_access 33 #define SYS_kill 37 #define SYS_brk 45 #define SYS_munmap 91 #define SYS_socketcall 102 #define SYS_setittimer 104 #define SYS_clone 120 #define SYS_sched_yield 158 #define SYS_nanosleep 162 #define SYS_rt_sigreturn 173 #define SYS_rt_sigaction 174 #define SYS_rt_sigprocmask 175 #define SYS_sigaltstack 186 #define SYS_mmap2 192 #define SYS_mincore 218 #define SYS_madvise 219 #define SYS_gettid 224 #define SYS_futex 240 #define SYS_sched_getaffinity 242 #define SYS_set_thread_area 243 #define SYS_exit_group 252 #define SYS_timer_create 259 #define SYS_timer_settime 260 #define SYS_timer_delete 263 #define SYS_clock_gettime 265 #define SYS_tgkill 270 #define SYS_pipe2 331 TEXT runtime路exit(SB),NOSPLIT,$0 MOVL $SYS_exit_group, AX MOVL code+0(FP), BX INVOKE_SYSCALL INT $3 // not reached RET TEXT exit1<>(SB),NOSPLIT,$0 MOVL $SYS_exit, AX MOVL code+0(FP), BX INVOKE_SYSCALL INT $3 // not reached RET // func exitThread(wait *atomic.Uint32) TEXT runtime路exitThread(SB),NOSPLIT,$0-4 MOVL wait+0(FP), AX // We're done using the stack. MOVL $0, (AX) MOVL $1, AX // exit (just this thread) MOVL $0, BX // exit code INT $0x80 // no stack; must not use CALL // We may not even have a stack any more. INT $3 JMP 0(PC) TEXT runtime路open(SB),NOSPLIT,$0 MOVL $SYS_open, AX MOVL name+0(FP), BX MOVL mode+4(FP), CX MOVL perm+8(FP), DX INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS 2(PC) MOVL $-1, AX MOVL AX, ret+12(FP) RET TEXT runtime路closefd(SB),NOSPLIT,$0 MOVL $SYS_close, AX MOVL fd+0(FP), BX INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS 2(PC) MOVL $-1, AX MOVL AX, ret+4(FP) RET TEXT runtime路write1(SB),NOSPLIT,$0 MOVL $SYS_write, AX MOVL fd+0(FP), BX MOVL p+4(FP), CX MOVL n+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET TEXT runtime路read(SB),NOSPLIT,$0 MOVL $SYS_read, AX MOVL fd+0(FP), BX MOVL p+4(FP), CX MOVL n+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // func pipe2(flags int32) (r, w int32, errno int32) TEXT runtime路pipe2(SB),NOSPLIT,$0-16 MOVL $SYS_pipe2, AX LEAL r+4(FP), BX MOVL flags+0(FP), CX INVOKE_SYSCALL MOVL AX, errno+12(FP) RET TEXT runtime路usleep(SB),NOSPLIT,$8 MOVL $0, DX MOVL usec+0(FP), AX MOVL $1000000, CX DIVL CX MOVL AX, 0(SP) MOVL $1000, AX // usec to nsec MULL DX MOVL AX, 4(SP) // nanosleep(&ts, 0) MOVL $SYS_nanosleep, AX LEAL 0(SP), BX MOVL $0, CX INVOKE_SYSCALL RET TEXT runtime路gettid(SB),NOSPLIT,$0-4 MOVL $SYS_gettid, AX INVOKE_SYSCALL MOVL AX, ret+0(FP) RET TEXT runtime路raise(SB),NOSPLIT,$12 MOVL $SYS_getpid, AX INVOKE_SYSCALL MOVL AX, BX // arg 1 pid MOVL $SYS_gettid, AX INVOKE_SYSCALL MOVL AX, CX // arg 2 tid MOVL sig+0(FP), DX // arg 3 signal MOVL $SYS_tgkill, AX INVOKE_SYSCALL RET TEXT runtime路raiseproc(SB),NOSPLIT,$12 MOVL $SYS_getpid, AX INVOKE_SYSCALL MOVL AX, BX // arg 1 pid MOVL sig+0(FP), CX // arg 2 signal MOVL $SYS_kill, AX INVOKE_SYSCALL RET TEXT 路getpid(SB),NOSPLIT,$0-4 MOVL $SYS_getpid, AX INVOKE_SYSCALL MOVL AX, ret+0(FP) RET TEXT 路tgkill(SB),NOSPLIT,$0 MOVL $SYS_tgkill, AX MOVL tgid+0(FP), BX MOVL tid+4(FP), CX MOVL sig+8(FP), DX INVOKE_SYSCALL RET TEXT runtime路setitimer(SB),NOSPLIT,$0-12 MOVL $SYS_setittimer, AX MOVL mode+0(FP), BX MOVL new+4(FP), CX MOVL old+8(FP), DX INVOKE_SYSCALL RET TEXT runtime路timer_create(SB),NOSPLIT,$0-16 MOVL $SYS_timer_create, AX MOVL clockid+0(FP), BX MOVL sevp+4(FP), CX MOVL timerid+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET TEXT runtime路timer_settime(SB),NOSPLIT,$0-20 MOVL $SYS_timer_settime, AX MOVL timerid+0(FP), BX MOVL flags+4(FP), CX MOVL new+8(FP), DX MOVL old+12(FP), SI INVOKE_SYSCALL MOVL AX, ret+16(FP) RET TEXT runtime路timer_delete(SB),NOSPLIT,$0-8 MOVL $SYS_timer_delete, AX MOVL timerid+0(FP), BX INVOKE_SYSCALL MOVL AX, ret+4(FP) RET TEXT runtime路mincore(SB),NOSPLIT,$0-16 MOVL $SYS_mincore, AX MOVL addr+0(FP), BX MOVL n+4(FP), CX MOVL dst+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // func walltime() (sec int64, nsec int32) TEXT runtime路walltime(SB), NOSPLIT, $8-12 // We don't know how much stack space the VDSO code will need, // so switch to g0. MOVL SP, BP // Save old SP; BP unchanged by C code. get_tls(CX) MOVL g(CX), AX MOVL g_m(AX), SI // SI unchanged by C code. // Set vdsoPC and vdsoSP for SIGPROF traceback. // Save the old values on stack and restore them on exit, // so this function is reentrant. MOVL m_vdsoPC(SI), CX MOVL m_vdsoSP(SI), DX MOVL CX, 0(SP) MOVL DX, 4(SP) LEAL sec+0(FP), DX MOVL -4(DX), CX MOVL CX, m_vdsoPC(SI) MOVL DX, m_vdsoSP(SI) CMPL AX, m_curg(SI) // Only switch if on curg. JNE noswitch MOVL m_g0(SI), DX MOVL (g_sched+gobuf_sp)(DX), SP // Set SP to g0 stack noswitch: SUBL $16, SP // Space for results ANDL $~15, SP // Align for C code // Stack layout, depending on call path: // x(SP) vDSO INVOKE_SYSCALL // 12 ts.tv_nsec ts.tv_nsec // 8 ts.tv_sec ts.tv_sec // 4 &ts - // 0 CLOCK_<id> - MOVL runtime路vdsoClockgettimeSym(SB), AX CMPL AX, $0 JEQ fallback LEAL 8(SP), BX // &ts (struct timespec) MOVL BX, 4(SP) MOVL $0, 0(SP) // CLOCK_REALTIME CALL AX JMP finish fallback: MOVL $SYS_clock_gettime, AX MOVL $0, BX // CLOCK_REALTIME LEAL 8(SP), CX INVOKE_SYSCALL finish: MOVL 8(SP), AX // sec MOVL 12(SP), BX // nsec MOVL BP, SP // Restore real SP // Restore vdsoPC, vdsoSP // We don't worry about being signaled between the two stores. // If we are not in a signal handler, we'll restore vdsoSP to 0, // and no one will care about vdsoPC. If we are in a signal handler, // we cannot receive another signal. MOVL 4(SP), CX MOVL CX, m_vdsoSP(SI) MOVL 0(SP), CX MOVL CX, m_vdsoPC(SI) // sec is in AX, nsec in BX MOVL AX, sec_lo+0(FP) MOVL $0, sec_hi+4(FP) MOVL BX, nsec+8(FP) RET // int64 nanotime(void) so really // void nanotime(int64 *nsec) TEXT runtime路nanotime1(SB), NOSPLIT, $8-8 // Switch to g0 stack. See comment above in runtime路walltime. MOVL SP, BP // Save old SP; BP unchanged by C code. get_tls(CX) MOVL g(CX), AX MOVL g_m(AX), SI // SI unchanged by C code. // Set vdsoPC and vdsoSP for SIGPROF traceback. // Save the old values on stack and restore them on exit, // so this function is reentrant. MOVL m_vdsoPC(SI), CX MOVL m_vdsoSP(SI), DX MOVL CX, 0(SP) MOVL DX, 4(SP) LEAL ret+0(FP), DX MOVL -4(DX), CX MOVL CX, m_vdsoPC(SI) MOVL DX, m_vdsoSP(SI) CMPL AX, m_curg(SI) // Only switch if on curg. JNE noswitch MOVL m_g0(SI), DX MOVL (g_sched+gobuf_sp)(DX), SP // Set SP to g0 stack noswitch: SUBL $16, SP // Space for results ANDL $~15, SP // Align for C code MOVL runtime路vdsoClockgettimeSym(SB), AX CMPL AX, $0 JEQ fallback LEAL 8(SP), BX // &ts (struct timespec) MOVL BX, 4(SP) MOVL $1, 0(SP) // CLOCK_MONOTONIC CALL AX JMP finish fallback: MOVL $SYS_clock_gettime, AX MOVL $1, BX // CLOCK_MONOTONIC LEAL 8(SP), CX INVOKE_SYSCALL finish: MOVL 8(SP), AX // sec MOVL 12(SP), BX // nsec MOVL BP, SP // Restore real SP // Restore vdsoPC, vdsoSP // We don't worry about being signaled between the two stores. // If we are not in a signal handler, we'll restore vdsoSP to 0, // and no one will care about vdsoPC. If we are in a signal handler, // we cannot receive another signal. MOVL 4(SP), CX MOVL CX, m_vdsoSP(SI) MOVL 0(SP), CX MOVL CX, m_vdsoPC(SI) // sec is in AX, nsec in BX // convert to DX:AX nsec MOVL $1000000000, CX MULL CX ADDL BX, AX ADCL $0, DX MOVL AX, ret_lo+0(FP) MOVL DX, ret_hi+4(FP) RET TEXT runtime路rtsigprocmask(SB),NOSPLIT,$0 MOVL $SYS_rt_sigprocmask, AX MOVL how+0(FP), BX MOVL new+4(FP), CX MOVL old+8(FP), DX MOVL size+12(FP), SI INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS 2(PC) INT $3 RET TEXT runtime路rt_sigaction(SB),NOSPLIT,$0 MOVL $SYS_rt_sigaction, AX MOVL sig+0(FP), BX MOVL new+4(FP), CX MOVL old+8(FP), DX MOVL size+12(FP), SI INVOKE_SYSCALL MOVL AX, ret+16(FP) RET TEXT runtime路sigfwd(SB),NOSPLIT,$12-16 MOVL fn+0(FP), AX MOVL sig+4(FP), BX MOVL info+8(FP), CX MOVL ctx+12(FP), DX MOVL SP, SI SUBL $32, SP ANDL $-15, SP // align stack: handler might be a C function MOVL BX, 0(SP) MOVL CX, 4(SP) MOVL DX, 8(SP) MOVL SI, 12(SP) // save SI: handler might be a Go function CALL AX MOVL 12(SP), AX MOVL AX, SP RET // Called using C ABI. TEXT runtime路sigtramp(SB),NOSPLIT|TOPFRAME,$28 // Save callee-saved C registers, since the caller may be a C signal handler. MOVL BX, bx-4(SP) MOVL BP, bp-8(SP) MOVL SI, si-12(SP) MOVL DI, di-16(SP) // We don't save mxcsr or the x87 control word because sigtrampgo doesn't // modify them. MOVL (28+4)(SP), BX MOVL BX, 0(SP) MOVL (28+8)(SP), BX MOVL BX, 4(SP) MOVL (28+12)(SP), BX MOVL BX, 8(SP) CALL runtime路sigtrampgo(SB) MOVL di-16(SP), DI MOVL si-12(SP), SI MOVL bp-8(SP), BP MOVL bx-4(SP), BX RET TEXT runtime路cgoSigtramp(SB),NOSPLIT,$0 JMP runtime路sigtramp(SB) // For cgo unwinding to work, this function must look precisely like // the one in glibc. The glibc source code is: // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/i386/libc_sigaction.c;h=0665b41bbcd0986f0b33bf19a7ecbcedf9961d0a#l59 // The code that cares about the precise instructions used is: // https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/i386/linux-unwind.h;h=5486223d60272c73d5103b29ae592d2ee998e1cf#l136 // // For gdb unwinding to work, this function must look precisely like the one in // glibc and must be named "__restore_rt" or contain the string "sigaction" in // the name. The gdb source code is: // https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/i386-linux-tdep.c;h=a6adeca1b97416f7194341151a8ce30723a786a3#l168 TEXT runtime路sigreturn__sigaction(SB),NOSPLIT,$0 MOVL $SYS_rt_sigreturn, AX // Sigreturn expects same SP as signal handler, // so cannot CALL 0x10(GS) here. INT $0x80 INT $3 // not reached RET TEXT runtime路mmap(SB),NOSPLIT,$0 MOVL $SYS_mmap2, AX MOVL addr+0(FP), BX MOVL n+4(FP), CX MOVL prot+8(FP), DX MOVL flags+12(FP), SI MOVL fd+16(FP), DI MOVL off+20(FP), BP SHRL $12, BP INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS ok NOTL AX INCL AX MOVL $0, p+24(FP) MOVL AX, err+28(FP) RET ok: MOVL AX, p+24(FP) MOVL $0, err+28(FP) RET TEXT runtime路munmap(SB),NOSPLIT,$0 MOVL $SYS_munmap, AX MOVL addr+0(FP), BX MOVL n+4(FP), CX INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS 2(PC) INT $3 RET TEXT runtime路madvise(SB),NOSPLIT,$0 MOVL $SYS_madvise, AX MOVL addr+0(FP), BX MOVL n+4(FP), CX MOVL flags+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // int32 futex(int32 *uaddr, int32 op, int32 val, // struct timespec *timeout, int32 *uaddr2, int32 val2); TEXT runtime路futex(SB),NOSPLIT,$0 MOVL $SYS_futex, AX MOVL addr+0(FP), BX MOVL op+4(FP), CX MOVL val+8(FP), DX MOVL ts+12(FP), SI MOVL addr2+16(FP), DI MOVL val3+20(FP), BP INVOKE_SYSCALL MOVL AX, ret+24(FP) RET // int32 clone(int32 flags, void *stack, M *mp, G *gp, void (*fn)(void)); TEXT runtime路clone(SB),NOSPLIT,$0 MOVL $SYS_clone, AX MOVL flags+0(FP), BX MOVL stk+4(FP), CX MOVL $0, DX // parent tid ptr MOVL $0, DI // child tid ptr // Copy mp, gp, fn off parent stack for use by child. SUBL $16, CX MOVL mp+8(FP), SI MOVL SI, 0(CX) MOVL gp+12(FP), SI MOVL SI, 4(CX) MOVL fn+16(FP), SI MOVL SI, 8(CX) MOVL $1234, 12(CX) // cannot use CALL 0x10(GS) here, because the stack changes during the // system call (after CALL 0x10(GS), the child is still using the // parent's stack when executing its RET instruction). INT $0x80 // In parent, return. CMPL AX, $0 JEQ 3(PC) MOVL AX, ret+20(FP) RET // Paranoia: check that SP is as we expect. NOP SP // tell vet SP changed - stop checking offsets MOVL 12(SP), BP CMPL BP, $1234 JEQ 2(PC) INT $3 // Initialize AX to Linux tid MOVL $SYS_gettid, AX INVOKE_SYSCALL MOVL 0(SP), BX // m MOVL 4(SP), DX // g MOVL 8(SP), SI // fn CMPL BX, $0 JEQ nog CMPL DX, $0 JEQ nog MOVL AX, m_procid(BX) // save tid as m->procid // set up ldt 7+id to point at m->tls. LEAL m_tls(BX), BP MOVL m_id(BX), DI ADDL $7, DI // m0 is LDT#7. count up. // setldt(tls#, &tls, sizeof tls) PUSHAL // save registers PUSHL $32 // sizeof tls PUSHL BP // &tls PUSHL DI // tls # CALL runtime路setldt(SB) POPL AX POPL AX POPL AX POPAL // Now segment is established. Initialize m, g. get_tls(AX) MOVL DX, g(AX) MOVL BX, g_m(DX) CALL runtime路stackcheck(SB) // smashes AX, CX MOVL 0(DX), DX // paranoia; check they are not nil MOVL 0(BX), BX // more paranoia; check that stack splitting code works PUSHAL CALL runtime路emptyfunc(SB) POPAL nog: CALL SI // fn() CALL exit1<>(SB) MOVL $0x1234, 0x1005 TEXT runtime路sigaltstack(SB),NOSPLIT,$-8 MOVL $SYS_sigaltstack, AX MOVL new+0(FP), BX MOVL old+4(FP), CX INVOKE_SYSCALL CMPL AX, $0xfffff001 JLS 2(PC) INT $3 RET // <asm-i386/ldt.h> // struct user_desc { // unsigned int entry_number; // unsigned long base_addr; // unsigned int limit; // unsigned int seg_32bit:1; // unsigned int contents:2; // unsigned int read_exec_only:1; // unsigned int limit_in_pages:1; // unsigned int seg_not_present:1; // unsigned int useable:1; // }; #define SEG_32BIT 0x01 // contents are the 2 bits 0x02 and 0x04. #define CONTENTS_DATA 0x00 #define CONTENTS_STACK 0x02 #define CONTENTS_CODE 0x04 #define READ_EXEC_ONLY 0x08 #define LIMIT_IN_PAGES 0x10 #define SEG_NOT_PRESENT 0x20 #define USEABLE 0x40 // `-1` means the kernel will pick a TLS entry on the first setldt call, // which happens during runtime init, and that we'll store back the saved // entry and reuse that on subsequent calls when creating new threads. DATA runtime路tls_entry_number+0(SB)/4, $-1 GLOBL runtime路tls_entry_number(SB), NOPTR, $4 // setldt(int entry, int address, int limit) // We use set_thread_area, which mucks with the GDT, instead of modify_ldt, // which would modify the LDT, but is disabled on some kernels. // The name, setldt, is a misnomer, although we leave this name as it is for // the compatibility with other platforms. TEXT runtime路setldt(SB),NOSPLIT,$32 MOVL base+4(FP), DX #ifdef GOOS_android // Android stores the TLS offset in runtime路tls_g. SUBL runtime路tls_g(SB), DX MOVL DX, 0(DX) #else /* * When linking against the system libraries, * we use its pthread_create and let it set up %gs * for us. When we do that, the private storage * we get is not at 0(GS), but -4(GS). * To insulate the rest of the tool chain from this * ugliness, 8l rewrites 0(TLS) into -4(GS) for us. * To accommodate that rewrite, we translate * the address here and bump the limit to 0xffffffff (no limit) * so that -4(GS) maps to 0(address). * Also, the final 0(GS) (current 4(DX)) has to point * to itself, to mimic ELF. */ ADDL $0x4, DX // address MOVL DX, 0(DX) #endif // get entry number MOVL runtime路tls_entry_number(SB), CX // set up user_desc LEAL 16(SP), AX // struct user_desc MOVL CX, 0(AX) // unsigned int entry_number MOVL DX, 4(AX) // unsigned long base_addr MOVL $0xfffff, 8(AX) // unsigned int limit MOVL $(SEG_32BIT|LIMIT_IN_PAGES|USEABLE|CONTENTS_DATA), 12(AX) // flag bits // call set_thread_area MOVL AX, BX // user_desc MOVL $SYS_set_thread_area, AX // We can't call this via 0x10(GS) because this is called from setldt0 to set that up. INT $0x80 // breakpoint on error CMPL AX, $0xfffff001 JLS 2(PC) INT $3 // read allocated entry number back out of user_desc LEAL 16(SP), AX // get our user_desc back MOVL 0(AX), AX // store entry number if the kernel allocated it CMPL CX, $-1 JNE 2(PC) MOVL AX, runtime路tls_entry_number(SB) // compute segment selector - (entry*8+3) SHLL $3, AX ADDL $3, AX MOVW AX, GS RET TEXT runtime路osyield(SB),NOSPLIT,$0 MOVL $SYS_sched_yield, AX INVOKE_SYSCALL RET TEXT runtime路sched_getaffinity(SB),NOSPLIT,$0 MOVL $SYS_sched_getaffinity, AX MOVL pid+0(FP), BX MOVL len+4(FP), CX MOVL buf+8(FP), DX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // int access(const char *name, int mode) TEXT runtime路access(SB),NOSPLIT,$0 MOVL $SYS_access, AX MOVL name+0(FP), BX MOVL mode+4(FP), CX INVOKE_SYSCALL MOVL AX, ret+8(FP) RET // int connect(int fd, const struct sockaddr *addr, socklen_t addrlen) TEXT runtime路connect(SB),NOSPLIT,$0-16 // connect is implemented as socketcall(NR_socket, 3, *(rest of args)) // stack already should have fd, addr, addrlen. MOVL $SYS_socketcall, AX MOVL $3, BX // connect LEAL fd+0(FP), CX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // int socket(int domain, int type, int protocol) TEXT runtime路socket(SB),NOSPLIT,$0-16 // socket is implemented as socketcall(NR_socket, 1, *(rest of args)) // stack already should have domain, type, protocol. MOVL $SYS_socketcall, AX MOVL $1, BX // socket LEAL domain+0(FP), CX INVOKE_SYSCALL MOVL AX, ret+12(FP) RET // func sbrk0() uintptr TEXT runtime路sbrk0(SB),NOSPLIT,$0-4 // Implemented as brk(NULL). MOVL $SYS_brk, AX MOVL $0, BX // NULL INVOKE_SYSCALL MOVL AX, ret+0(FP) RET
Upload File
Create Folder