X7ROOT File Manager
Current Path:
/opt/golang/1.19.4/src/runtime
opt
/
golang
/
1.19.4
/
src
/
runtime
/
馃搧
..
馃搫
HACKING.md
(15.29 KB)
馃搫
Makefile
(178 B)
馃搫
abi_test.go
(2.83 KB)
馃搫
alg.go
(9.45 KB)
馃搫
align_runtime_test.go
(2.73 KB)
馃搫
align_test.go
(5.26 KB)
馃搧
asan
馃搫
asan.go
(1.55 KB)
馃搫
asan0.go
(761 B)
馃搫
asan_amd64.s
(2.46 KB)
馃搫
asan_arm64.s
(2.15 KB)
馃搫
asan_riscv64.s
(1.92 KB)
馃搫
asm.s
(278 B)
馃搫
asm_386.s
(40.43 KB)
馃搫
asm_amd64.h
(411 B)
馃搫
asm_amd64.s
(57.44 KB)
馃搫
asm_arm.s
(30.2 KB)
馃搫
asm_arm64.s
(41.41 KB)
馃搫
asm_loong64.s
(21.79 KB)
馃搫
asm_mips64x.s
(22.43 KB)
馃搫
asm_mipsx.s
(24.41 KB)
馃搫
asm_ppc64x.h
(1023 B)
馃搫
asm_ppc64x.s
(35.21 KB)
馃搫
asm_riscv64.s
(26.43 KB)
馃搫
asm_s390x.s
(26.08 KB)
馃搫
asm_wasm.s
(9.38 KB)
馃搫
atomic_arm64.s
(259 B)
馃搫
atomic_loong64.s
(245 B)
馃搫
atomic_mips64x.s
(300 B)
馃搫
atomic_mipsx.s
(262 B)
馃搫
atomic_pointer.go
(2.62 KB)
馃搫
atomic_ppc64x.s
(437 B)
馃搫
atomic_riscv64.s
(275 B)
馃搫
auxv_none.go
(298 B)
馃搫
callers_test.go
(8.44 KB)
馃搧
cgo
馃搫
cgo.go
(2 KB)
馃搫
cgo_mmap.go
(2.4 KB)
馃搫
cgo_ppc64x.go
(418 B)
馃搫
cgo_sigaction.go
(3.28 KB)
馃搫
cgocall.go
(19.12 KB)
馃搫
cgocallback.go
(317 B)
馃搫
cgocheck.go
(6.86 KB)
馃搫
chan.go
(23.73 KB)
馃搫
chan_test.go
(23.37 KB)
馃搫
chanbarrier_test.go
(1.4 KB)
馃搫
checkptr.go
(3.29 KB)
馃搫
checkptr_test.go
(2.73 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)
馃搫
cpuflags.go
(810 B)
馃搫
cpuflags_amd64.go
(533 B)
馃搫
cpuflags_arm64.go
(334 B)
馃搫
cpuprof.go
(7.78 KB)
馃搫
cputicks.go
(449 B)
馃搫
crash_cgo_test.go
(18.14 KB)
馃搫
crash_test.go
(21.77 KB)
馃搫
crash_unix_test.go
(8.39 KB)
馃搧
debug
馃搫
debug.go
(3.23 KB)
馃搫
debug_test.go
(7.98 KB)
馃搫
debugcall.go
(6.19 KB)
馃搫
debuglog.go
(17.87 KB)
馃搫
debuglog_off.go
(357 B)
馃搫
debuglog_on.go
(1.09 KB)
馃搫
debuglog_test.go
(4.56 KB)
馃搫
defer_test.go
(11.56 KB)
馃搫
defs1_linux.go
(845 B)
馃搫
defs1_netbsd_386.go
(2.83 KB)
馃搫
defs1_netbsd_amd64.go
(3.06 KB)
馃搫
defs1_netbsd_arm.go
(2.94 KB)
馃搫
defs1_netbsd_arm64.go
(3.17 KB)
馃搫
defs1_solaris_amd64.go
(4 KB)
馃搫
defs2_linux.go
(3.51 KB)
馃搫
defs3_linux.go
(1.09 KB)
馃搫
defs_aix.go
(4.16 KB)
馃搫
defs_aix_ppc64.go
(3.61 KB)
馃搫
defs_arm_linux.go
(2.67 KB)
馃搫
defs_darwin.go
(3.78 KB)
馃搫
defs_darwin_amd64.go
(6.07 KB)
馃搫
defs_darwin_arm64.go
(3.89 KB)
馃搫
defs_dragonfly.go
(2.59 KB)
馃搫
defs_dragonfly_amd64.go
(3.29 KB)
馃搫
defs_freebsd.go
(3.82 KB)
馃搫
defs_freebsd_386.go
(4.36 KB)
馃搫
defs_freebsd_amd64.go
(4.63 KB)
馃搫
defs_freebsd_arm.go
(3.69 KB)
馃搫
defs_freebsd_arm64.go
(4.01 KB)
馃搫
defs_illumos_amd64.go
(285 B)
馃搫
defs_linux.go
(3.25 KB)
馃搫
defs_linux_386.go
(4.42 KB)
馃搫
defs_linux_amd64.go
(4.93 KB)
馃搫
defs_linux_arm.go
(4.11 KB)
馃搫
defs_linux_arm64.go
(3.86 KB)
馃搫
defs_linux_loong64.go
(3.68 KB)
馃搫
defs_linux_mips64x.go
(3.85 KB)
馃搫
defs_linux_mipsx.go
(3.83 KB)
馃搫
defs_linux_ppc64.go
(3.93 KB)
馃搫
defs_linux_ppc64le.go
(3.93 KB)
馃搫
defs_linux_riscv64.go
(4.06 KB)
馃搫
defs_linux_s390x.go
(3.41 KB)
馃搫
defs_netbsd.go
(2.72 KB)
馃搫
defs_netbsd_386.go
(855 B)
馃搫
defs_netbsd_amd64.go
(1.01 KB)
馃搫
defs_netbsd_arm.go
(764 B)
馃搫
defs_openbsd.go
(3.09 KB)
馃搫
defs_openbsd_386.go
(2.87 KB)
馃搫
defs_openbsd_amd64.go
(3.07 KB)
馃搫
defs_openbsd_arm.go
(2.99 KB)
馃搫
defs_openbsd_arm64.go
(2.74 KB)
馃搫
defs_openbsd_mips64.go
(2.64 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.31 KB)
馃搫
defs_solaris_amd64.go
(1004 B)
馃搫
defs_windows.go
(2.09 KB)
馃搫
defs_windows_386.go
(1.98 KB)
馃搫
defs_windows_amd64.go
(2.71 KB)
馃搫
defs_windows_arm.go
(2.11 KB)
馃搫
defs_windows_arm64.go
(2.63 KB)
馃搫
duff_386.s
(8.24 KB)
馃搫
duff_amd64.s
(5.62 KB)
馃搫
duff_arm.s
(7.11 KB)
馃搫
duff_arm64.s
(5.27 KB)
馃搫
duff_loong64.s
(12 KB)
馃搫
duff_mips64x.s
(11.28 KB)
馃搫
duff_ppc64x.s
(7.06 KB)
馃搫
duff_riscv64.s
(11.4 KB)
馃搫
duff_s390x.s
(507 B)
馃搫
env_plan9.go
(3 KB)
馃搫
env_posix.go
(1.79 KB)
馃搫
env_test.go
(1.16 KB)
馃搫
error.go
(9.21 KB)
馃搫
example_test.go
(1.55 KB)
馃搫
export_aix_test.go
(234 B)
馃搫
export_arm_test.go
(226 B)
馃搫
export_darwin_test.go
(382 B)
馃搫
export_debug_amd64_test.go
(3.6 KB)
馃搫
export_debug_arm64_test.go
(3.49 KB)
馃搫
export_debug_test.go
(5.05 KB)
馃搫
export_debuglog_test.go
(1.24 KB)
馃搫
export_linux_test.go
(550 B)
馃搫
export_mmap_test.go
(429 B)
馃搫
export_pipe2_test.go
(310 B)
馃搫
export_pipe_test.go
(219 B)
馃搫
export_solaris_test.go
(282 B)
馃搫
export_test.go
(38.87 KB)
馃搫
export_unix_test.go
(2.18 KB)
馃搫
export_windows_test.go
(677 B)
馃搫
extern.go
(13.62 KB)
馃搫
fastlog2.go
(1.22 KB)
馃搫
fastlog2_test.go
(784 B)
馃搫
fastlog2table.go
(904 B)
馃搫
float.go
(1.35 KB)
馃搫
float_test.go
(699 B)
馃搫
funcdata.h
(2.55 KB)
馃搫
gc_test.go
(20.04 KB)
馃搫
gcinfo_test.go
(5.59 KB)
馃搫
go_tls.h
(366 B)
馃搫
hash32.go
(1.58 KB)
馃搫
hash64.go
(1.95 KB)
馃搫
hash_test.go
(16.77 KB)
馃搫
heapdump.go
(17.65 KB)
馃搫
histogram.go
(6.19 KB)
馃搫
histogram_test.go
(3.42 KB)
馃搫
iface.go
(15.66 KB)
馃搫
iface_test.go
(7.45 KB)
馃搧
internal
馃搫
lfstack.go
(1.77 KB)
馃搫
lfstack_32bit.go
(532 B)
馃搫
lfstack_64bit.go
(2.18 KB)
馃搫
lfstack_test.go
(2.77 KB)
馃搫
libfuzzer.go
(6.5 KB)
馃搫
libfuzzer_amd64.s
(5.01 KB)
馃搫
libfuzzer_arm64.s
(3.15 KB)
馃搫
lock_futex.go
(5.19 KB)
馃搫
lock_js.go
(6.14 KB)
馃搫
lock_sema.go
(6.74 KB)
馃搫
lockrank.go
(13.26 KB)
馃搫
lockrank_off.go
(1.14 KB)
馃搫
lockrank_on.go
(9.83 KB)
馃搫
lockrank_test.go
(1.15 KB)
馃搫
malloc.go
(51.01 KB)
馃搫
malloc_test.go
(10.78 KB)
馃搫
map.go
(43.52 KB)
馃搫
map_benchmark_test.go
(10.48 KB)
馃搫
map_fast32.go
(12.72 KB)
馃搫
map_fast64.go
(12.91 KB)
馃搫
map_faststr.go
(14.3 KB)
馃搫
map_test.go
(27.44 KB)
馃搫
mbarrier.go
(12.43 KB)
馃搫
mbitmap.go
(66.08 KB)
馃搫
mcache.go
(10 KB)
馃搫
mcentral.go
(7.9 KB)
馃搫
mcheckmark.go
(2.81 KB)
馃搫
mem.go
(6.23 KB)
馃搫
mem_aix.go
(1.9 KB)
馃搫
mem_bsd.go
(2.03 KB)
馃搫
mem_darwin.go
(1.84 KB)
馃搫
mem_js.go
(2.25 KB)
馃搫
mem_linux.go
(6.15 KB)
馃搫
mem_plan9.go
(4.32 KB)
馃搫
mem_windows.go
(3.76 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
(778 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.23 KB)
馃搫
memclr_riscv64.s
(978 B)
馃搫
memclr_s390x.s
(1.96 KB)
馃搫
memclr_wasm.s
(622 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.6 KB)
馃搫
memmove_loong64.s
(1.8 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.58 KB)
馃搫
memmove_riscv64.s
(1.86 KB)
馃搫
memmove_s390x.s
(2.92 KB)
馃搫
memmove_test.go
(14.03 KB)
馃搫
memmove_wasm.s
(1.74 KB)
馃搧
metrics
馃搫
metrics.go
(18.71 KB)
馃搫
metrics_test.go
(14.74 KB)
馃搫
mfinal.go
(16.34 KB)
馃搫
mfinal_test.go
(6.19 KB)
馃搫
mfixalloc.go
(3.07 KB)
馃搫
mgc.go
(56.37 KB)
馃搫
mgclimit.go
(17.26 KB)
馃搫
mgclimit_test.go
(9.02 KB)
馃搫
mgcmark.go
(47.47 KB)
馃搫
mgcpacer.go
(60.12 KB)
馃搫
mgcpacer_test.go
(40.43 KB)
馃搫
mgcscavenge.go
(41.29 KB)
馃搫
mgcscavenge_test.go
(20.33 KB)
馃搫
mgcstack.go
(10.58 KB)
馃搫
mgcsweep.go
(27.89 KB)
馃搫
mgcwork.go
(12.86 KB)
馃搫
mheap.go
(69.14 KB)
馃搫
mkduff.go
(8.01 KB)
馃搫
mkfastlog2table.go
(3.08 KB)
馃搫
mkpreempt.go
(15.12 KB)
馃搫
mksizeclasses.go
(9.3 KB)
馃搫
mmap.go
(821 B)
馃搫
mpagealloc.go
(36.84 KB)
馃搫
mpagealloc_32bit.go
(3.81 KB)
馃搫
mpagealloc_64bit.go
(9.44 KB)
馃搫
mpagealloc_test.go
(32.59 KB)
馃搫
mpagecache.go
(5.46 KB)
馃搫
mpagecache_test.go
(10.79 KB)
馃搫
mpallocbits.go
(12.6 KB)
馃搫
mpallocbits_test.go
(13.69 KB)
馃搫
mprof.go
(38.51 KB)
馃搫
mranges.go
(13.64 KB)
馃搫
mranges_test.go
(5.68 KB)
馃搧
msan
馃搫
msan.go
(1.5 KB)
馃搫
msan0.go
(725 B)
馃搫
msan_amd64.s
(2.31 KB)
馃搫
msan_arm64.s
(1.99 KB)
馃搫
msize.go
(777 B)
馃搫
mspanset.go
(12.21 KB)
馃搫
mstats.go
(30.07 KB)
馃搫
mwbbuf.go
(9.28 KB)
馃搫
nbpipe_fcntl_libc_test.go
(470 B)
馃搫
nbpipe_fcntl_unix_test.go
(458 B)
馃搫
nbpipe_pipe.go
(405 B)
馃搫
nbpipe_pipe2.go
(344 B)
馃搫
nbpipe_pipe_test.go
(706 B)
馃搫
nbpipe_test.go
(1.68 KB)
馃搫
net_plan9.go
(645 B)
馃搫
netpoll.go
(18.27 KB)
馃搫
netpoll_aix.go
(4.83 KB)
馃搫
netpoll_epoll.go
(4.16 KB)
馃搫
netpoll_fake.go
(652 B)
馃搫
netpoll_kqueue.go
(4.56 KB)
馃搫
netpoll_os_test.go
(360 B)
馃搫
netpoll_solaris.go
(10.76 KB)
馃搫
netpoll_stub.go
(1.41 KB)
馃搫
netpoll_windows.go
(3.75 KB)
馃搫
norace_linux_test.go
(915 B)
馃搫
norace_test.go
(983 B)
馃搫
numcpu_freebsd_test.go
(381 B)
馃搫
os2_aix.go
(20.45 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.93 KB)
馃搫
os3_solaris.go
(17.22 KB)
馃搫
os_aix.go
(8.61 KB)
馃搫
os_android.go
(463 B)
馃搫
os_darwin.go
(12 KB)
馃搫
os_darwin_arm64.go
(416 B)
馃搫
os_dragonfly.go
(6.96 KB)
馃搫
os_freebsd.go
(11.61 KB)
馃搫
os_freebsd2.go
(603 B)
馃搫
os_freebsd_amd64.go
(658 B)
馃搫
os_freebsd_arm.go
(1.32 KB)
馃搫
os_freebsd_arm64.go
(398 B)
馃搫
os_freebsd_noauxv.go
(241 B)
馃搫
os_illumos.go
(3.93 KB)
馃搫
os_js.go
(3.28 KB)
馃搫
os_linux.go
(26.14 KB)
馃搫
os_linux_arm.go
(1.35 KB)
馃搫
os_linux_arm64.go
(556 B)
馃搫
os_linux_be64.go
(824 B)
馃搫
os_linux_generic.go
(888 B)
馃搫
os_linux_loong64.go
(485 B)
馃搫
os_linux_mips64x.go
(1.07 KB)
馃搫
os_linux_mipsx.go
(1.06 KB)
馃搫
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
(316 B)
馃搫
os_linux_x86.go
(234 B)
馃搫
os_netbsd.go
(9.8 KB)
馃搫
os_netbsd_386.go
(617 B)
馃搫
os_netbsd_amd64.go
(614 B)
馃搫
os_netbsd_arm.go
(1.16 KB)
馃搫
os_netbsd_arm64.go
(856 B)
馃搫
os_nonopenbsd.go
(437 B)
馃搫
os_only_solaris.go
(357 B)
馃搫
os_openbsd.go
(6.55 KB)
馃搫
os_openbsd_arm.go
(749 B)
馃搫
os_openbsd_arm64.go
(416 B)
馃搫
os_openbsd_libc.go
(1.71 KB)
馃搫
os_openbsd_mips64.go
(416 B)
馃搫
os_openbsd_syscall.go
(1.27 KB)
馃搫
os_openbsd_syscall1.go
(441 B)
馃搫
os_openbsd_syscall2.go
(2.46 KB)
馃搫
os_plan9.go
(10.3 KB)
馃搫
os_plan9_arm.go
(462 B)
馃搫
os_solaris.go
(6.55 KB)
馃搫
os_windows.go
(44.43 KB)
馃搫
os_windows_arm.go
(511 B)
馃搫
os_windows_arm64.go
(339 B)
馃搫
panic.go
(40.25 KB)
馃搫
panic32.go
(4.8 KB)
馃搫
panic_test.go
(1.71 KB)
馃搫
plugin.go
(4.26 KB)
馃搧
pprof
馃搫
preempt.go
(15.21 KB)
馃搫
preempt_386.s
(824 B)
馃搫
preempt_amd64.s
(1.62 KB)
馃搫
preempt_arm.s
(1.48 KB)
馃搫
preempt_arm64.s
(1.97 KB)
馃搫
preempt_loong64.s
(2.35 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.95 KB)
馃搫
proc.go
(176.84 KB)
馃搫
proc_runtime_test.go
(1.38 KB)
馃搫
proc_test.go
(25.66 KB)
馃搫
profbuf.go
(18.26 KB)
馃搫
profbuf_test.go
(8.65 KB)
馃搫
proflabel.go
(1.52 KB)
馃搧
race
馃搫
race.go
(18.58 KB)
馃搫
race0.go
(2.79 KB)
馃搫
race_amd64.s
(13.82 KB)
馃搫
race_arm64.s
(14.21 KB)
馃搫
race_ppc64le.s
(17.89 KB)
馃搫
race_s390x.s
(12 KB)
馃搫
rand_test.go
(907 B)
馃搫
rdebug.go
(553 B)
馃搫
relax_stub.go
(598 B)
馃搫
rt0_aix_ppc64.s
(4.33 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_illumos_amd64.s
(311 B)
馃搫
rt0_ios_amd64.s
(425 B)
馃搫
rt0_ios_arm64.s
(425 B)
馃搫
rt0_js_wasm.s
(2.3 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
(716 B)
馃搫
rt0_linux_mips64x.s
(1014 B)
馃搫
rt0_linux_mipsx.s
(797 B)
馃搫
rt0_linux_ppc64.s
(928 B)
馃搫
rt0_linux_ppc64le.s
(4.35 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_plan9_386.s
(523 B)
馃搫
rt0_plan9_amd64.s
(481 B)
馃搫
rt0_plan9_arm.s
(397 B)
馃搫
rt0_solaris_amd64.s
(311 B)
馃搫
rt0_windows_386.s
(1.28 KB)
馃搫
rt0_windows_amd64.s
(986 B)
馃搫
rt0_windows_arm.s
(386 B)
馃搫
rt0_windows_arm64.s
(725 B)
馃搫
runtime-gdb.py
(15.33 KB)
馃搫
runtime-gdb_test.go
(20.93 KB)
馃搫
runtime-lldb_test.go
(4.95 KB)
馃搫
runtime.go
(1.45 KB)
馃搫
runtime1.go
(13.06 KB)
馃搫
runtime2.go
(43.07 KB)
馃搫
runtime_boring.go
(606 B)
馃搫
runtime_linux_test.go
(1.95 KB)
馃搫
runtime_mmap_test.go
(1.77 KB)
馃搫
runtime_test.go
(11.79 KB)
馃搫
runtime_unix_test.go
(1.22 KB)
馃搫
rwmutex.go
(3.53 KB)
馃搫
rwmutex_test.go
(4.19 KB)
馃搫
select.go
(14.84 KB)
馃搫
sema.go
(16.16 KB)
馃搫
sema_test.go
(4.21 KB)
馃搫
semasleep_test.go
(3.05 KB)
馃搫
sigaction.go
(489 B)
馃搫
signal_386.go
(1.72 KB)
馃搫
signal_aix_ppc64.go
(3.55 KB)
馃搫
signal_amd64.go
(2.73 KB)
馃搫
signal_arm.go
(2.54 KB)
馃搫
signal_arm64.go
(3.21 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.23 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.42 KB)
馃搫
signal_linux_riscv64.go
(2.92 KB)
馃搫
signal_linux_s390x.go
(4.49 KB)
馃搫
signal_loong64.go
(3.09 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.38 KB)
馃搫
signal_openbsd_mips64.go
(3.28 KB)
馃搫
signal_plan9.go
(1.93 KB)
馃搫
signal_ppc64x.go
(3.64 KB)
馃搫
signal_riscv64.go
(2.89 KB)
馃搫
signal_solaris.go
(4.5 KB)
馃搫
signal_solaris_amd64.go
(2.47 KB)
馃搫
signal_unix.go
(41.88 KB)
馃搫
signal_windows.go
(9.27 KB)
馃搫
signal_windows_test.go
(5.29 KB)
馃搫
sigqueue.go
(7.66 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.14 KB)
馃搫
sizeof_test.go
(893 B)
馃搫
slice.go
(9.87 KB)
馃搫
slice_test.go
(10.32 KB)
馃搫
softfloat64.go
(11.54 KB)
馃搫
softfloat64_test.go
(4.04 KB)
馃搫
stack.go
(45.05 KB)
馃搫
stack_test.go
(22.39 KB)
馃搫
string.go
(13.18 KB)
馃搫
string_test.go
(12.61 KB)
馃搫
stubs.go
(19.37 KB)
馃搫
stubs2.go
(1.13 KB)
馃搫
stubs3.go
(274 B)
馃搫
stubs_386.go
(550 B)
馃搫
stubs_amd64.go
(1.2 KB)
馃搫
stubs_arm.go
(531 B)
馃搫
stubs_arm64.go
(555 B)
馃搫
stubs_linux.go
(650 B)
馃搫
stubs_loong64.go
(276 B)
馃搫
stubs_mips64x.go
(364 B)
馃搫
stubs_mipsx.go
(283 B)
馃搫
stubs_nonlinux.go
(298 B)
馃搫
stubs_ppc64.go
(301 B)
馃搫
stubs_ppc64x.go
(453 B)
馃搫
stubs_riscv64.go
(460 B)
馃搫
stubs_s390x.go
(256 B)
馃搫
symtab.go
(35.81 KB)
馃搫
symtab_test.go
(7.48 KB)
馃搫
sys_aix_ppc64.s
(7.42 KB)
馃搫
sys_arm.go
(521 B)
馃搫
sys_arm64.go
(469 B)
馃搫
sys_darwin.go
(17.92 KB)
馃搫
sys_darwin_amd64.s
(19.12 KB)
馃搫
sys_darwin_arm64.go
(1.74 KB)
馃搫
sys_darwin_arm64.s
(15.95 KB)
馃搫
sys_dragonfly_amd64.s
(8.03 KB)
馃搫
sys_freebsd_386.s
(8.41 KB)
馃搫
sys_freebsd_amd64.s
(10.7 KB)
馃搫
sys_freebsd_arm.s
(10.12 KB)
馃搫
sys_freebsd_arm64.s
(9.4 KB)
馃搫
sys_libc.go
(1.84 KB)
馃搫
sys_linux_386.s
(18.31 KB)
馃搫
sys_linux_amd64.s
(16.57 KB)
馃搫
sys_linux_arm.s
(16.12 KB)
馃搫
sys_linux_arm64.s
(18.09 KB)
馃搫
sys_linux_loong64.s
(12.15 KB)
馃搫
sys_linux_mips64x.s
(13.5 KB)
馃搫
sys_linux_mipsx.s
(11.09 KB)
馃搫
sys_linux_ppc64x.s
(22.1 KB)
馃搫
sys_linux_riscv64.s
(12.59 KB)
馃搫
sys_linux_s390x.s
(13.78 KB)
馃搫
sys_loong64.go
(489 B)
馃搫
sys_mips64x.go
(500 B)
馃搫
sys_mipsx.go
(496 B)
馃搫
sys_netbsd_386.s
(9.55 KB)
馃搫
sys_netbsd_amd64.s
(9.51 KB)
馃搫
sys_netbsd_arm.s
(10.41 KB)
馃搫
sys_netbsd_arm64.s
(9.38 KB)
馃搫
sys_nonppc64x.go
(245 B)
馃搫
sys_openbsd.go
(2.59 KB)
馃搫
sys_openbsd1.go
(1.23 KB)
馃搫
sys_openbsd2.go
(8.36 KB)
馃搫
sys_openbsd3.go
(3.37 KB)
馃搫
sys_openbsd_386.s
(20.03 KB)
馃搫
sys_openbsd_amd64.s
(16.64 KB)
馃搫
sys_openbsd_arm.s
(18.15 KB)
馃搫
sys_openbsd_arm64.s
(14.84 KB)
馃搫
sys_openbsd_mips64.s
(8.6 KB)
馃搫
sys_plan9_386.s
(4.48 KB)
馃搫
sys_plan9_amd64.s
(4.55 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
(754 B)
馃搫
sys_wasm.s
(2.65 KB)
馃搫
sys_windows_386.s
(7.65 KB)
馃搫
sys_windows_amd64.s
(8.88 KB)
馃搫
sys_windows_arm.s
(11.97 KB)
馃搫
sys_windows_arm64.s
(11.45 KB)
馃搫
sys_x86.go
(552 B)
馃搫
syscall2_solaris.go
(1.65 KB)
馃搫
syscall_aix.go
(6 KB)
馃搫
syscall_solaris.go
(8.01 KB)
馃搫
syscall_windows.go
(16.95 KB)
馃搫
syscall_windows_test.go
(32.96 KB)
馃搧
testdata
馃搫
textflag.h
(1.52 KB)
馃搫
time.go
(30.75 KB)
馃搫
time_fake.go
(2.5 KB)
馃搫
time_linux_amd64.s
(2.02 KB)
馃搫
time_nofake.go
(709 B)
馃搫
time_test.go
(2.03 KB)
馃搫
time_windows.h
(753 B)
馃搫
time_windows_386.s
(1.79 KB)
馃搫
time_windows_amd64.s
(871 B)
馃搫
time_windows_arm.s
(2.1 KB)
馃搫
time_windows_arm64.s
(1021 B)
馃搫
timeasm.go
(418 B)
馃搫
timestub.go
(532 B)
馃搫
timestub2.go
(314 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
(709 B)
馃搫
tls_ppc64x.s
(1.5 KB)
馃搫
tls_riscv64.s
(726 B)
馃搫
tls_s390x.s
(1.55 KB)
馃搫
tls_stub.go
(260 B)
馃搫
tls_windows_amd64.go
(294 B)
馃搧
trace
馃搫
trace.go
(45.8 KB)
馃搫
traceback.go
(48.18 KB)
馃搫
traceback_test.go
(11.64 KB)
馃搫
type.go
(17.43 KB)
馃搫
typekind.go
(742 B)
馃搫
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
(443 B)
馃搫
vdso_freebsd_x86.go
(1.85 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
(681 B)
馃搫
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.02 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_fcntl 55 #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_epoll_create 254 #define SYS_epoll_ctl 255 #define SYS_epoll_wait 256 #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_epoll_create1 329 #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) TEXT runtime路sigreturn(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 // int32 runtime路epollcreate(int32 size); TEXT runtime路epollcreate(SB),NOSPLIT,$0 MOVL $SYS_epoll_create, AX MOVL size+0(FP), BX INVOKE_SYSCALL MOVL AX, ret+4(FP) RET // int32 runtime路epollcreate1(int32 flags); TEXT runtime路epollcreate1(SB),NOSPLIT,$0 MOVL $SYS_epoll_create1, AX MOVL flags+0(FP), BX INVOKE_SYSCALL MOVL AX, ret+4(FP) RET // func epollctl(epfd, op, fd int32, ev *epollEvent) int TEXT runtime路epollctl(SB),NOSPLIT,$0 MOVL $SYS_epoll_ctl, AX MOVL epfd+0(FP), BX MOVL op+4(FP), CX MOVL fd+8(FP), DX MOVL ev+12(FP), SI INVOKE_SYSCALL MOVL AX, ret+16(FP) RET // int32 runtime路epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout); TEXT runtime路epollwait(SB),NOSPLIT,$0 MOVL $SYS_epoll_wait, AX MOVL epfd+0(FP), BX MOVL ev+4(FP), CX MOVL nev+8(FP), DX MOVL timeout+12(FP), SI INVOKE_SYSCALL MOVL AX, ret+16(FP) RET // void runtime路closeonexec(int32 fd); TEXT runtime路closeonexec(SB),NOSPLIT,$0 MOVL $SYS_fcntl, AX MOVL fd+0(FP), BX // fd MOVL $2, CX // F_SETFD MOVL $1, DX // FD_CLOEXEC INVOKE_SYSCALL 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