X7ROOT File Manager
Current Path:
/opt/golang/1.22.0/src/syscall
opt
/
golang
/
1.22.0
/
src
/
syscall
/
📁
..
📄
asan.go
(410 B)
📄
asan0.go
(342 B)
📄
asm9_unix2_amd64.s
(1.19 KB)
📄
asm_aix_ppc64.s
(540 B)
📄
asm_darwin_amd64.s
(2.93 KB)
📄
asm_darwin_arm64.s
(2.83 KB)
📄
asm_freebsd_arm.s
(2.96 KB)
📄
asm_freebsd_arm64.s
(2.79 KB)
📄
asm_freebsd_riscv64.s
(2.76 KB)
📄
asm_linux_386.s
(3.08 KB)
📄
asm_linux_amd64.s
(1.33 KB)
📄
asm_linux_arm.s
(1.77 KB)
📄
asm_linux_arm64.s
(916 B)
📄
asm_linux_loong64.s
(947 B)
📄
asm_linux_mips64x.s
(985 B)
📄
asm_linux_mipsx.s
(1.75 KB)
📄
asm_linux_ppc64x.s
(913 B)
📄
asm_linux_riscv64.s
(861 B)
📄
asm_linux_s390x.s
(2.15 KB)
📄
asm_netbsd_arm.s
(2.85 KB)
📄
asm_netbsd_arm64.s
(2.88 KB)
📄
asm_openbsd_386.s
(1.04 KB)
📄
asm_openbsd_amd64.s
(1.04 KB)
📄
asm_openbsd_arm.s
(1.04 KB)
📄
asm_openbsd_arm64.s
(1.04 KB)
📄
asm_openbsd_mips64.s
(2.85 KB)
📄
asm_openbsd_ppc64.s
(1.04 KB)
📄
asm_openbsd_riscv64.s
(1.04 KB)
📄
asm_plan9_386.s
(3.14 KB)
📄
asm_plan9_amd64.s
(3.36 KB)
📄
asm_plan9_arm.s
(3.25 KB)
📄
asm_solaris_amd64.s
(1.8 KB)
📄
asm_unix_386.s
(2.74 KB)
📄
asm_unix_amd64.s
(2.15 KB)
📄
bpf_bsd.go
(4.03 KB)
📄
const_plan9.go
(1.36 KB)
📄
creds_test.go
(3.37 KB)
📄
dir_plan9.go
(5.62 KB)
📄
dirent.go
(3.09 KB)
📄
dirent_test.go
(3.43 KB)
📄
dll_windows.go
(7.63 KB)
📄
endian_big.go
(249 B)
📄
endian_little.go
(309 B)
📄
env_unix.go
(2.73 KB)
📄
env_windows.go
(1.96 KB)
📄
errors_plan9.go
(1.61 KB)
📄
exec_aix_test.go
(823 B)
📄
exec_bsd.go
(7.95 KB)
📄
exec_freebsd.go
(8.43 KB)
📄
exec_freebsd_test.go
(2.41 KB)
📄
exec_libc.go
(8.17 KB)
📄
exec_libc2.go
(8.19 KB)
📄
exec_linux.go
(22.81 KB)
📄
exec_linux_test.go
(20.37 KB)
📄
exec_pdeathsig_test.go
(4.49 KB)
📄
exec_plan9.go
(13.25 KB)
📄
exec_solaris_test.go
(815 B)
📄
exec_unix.go
(8.63 KB)
📄
exec_unix_test.go
(8.28 KB)
📄
exec_windows.go
(10.3 KB)
📄
exec_windows_test.go
(3.11 KB)
📄
export_darwin_test.go
(348 B)
📄
export_linux_test.go
(296 B)
📄
export_rlimit_test.go
(262 B)
📄
export_unix_test.go
(391 B)
📄
export_wasip1_test.go
(267 B)
📄
export_windows_test.go
(500 B)
📄
flock_aix.go
(564 B)
📄
flock_bsd.go
(469 B)
📄
flock_linux.go
(641 B)
📄
flock_linux_32bit.go
(511 B)
📄
forkpipe.go
(604 B)
📄
forkpipe2.go
(2.6 KB)
📄
fs_js.go
(10.84 KB)
📄
fs_wasip1.go
(24.07 KB)
📄
fs_wasip1_test.go
(1.98 KB)
📄
getdirentries_test.go
(2.07 KB)
📁
js
📄
lsf_linux.go
(2.12 KB)
📄
mkall.sh
(14.62 KB)
📄
mkasm.go
(1.88 KB)
📄
mkerrors.sh
(10.71 KB)
📄
mkpost.go
(2.28 KB)
📄
mksyscall.pl
(10.19 KB)
📄
mksyscall_libc.pl
(8.02 KB)
📄
mksyscall_windows.go
(1.99 KB)
📄
mksysctl_openbsd.pl
(5.04 KB)
📄
mksysnum_dragonfly.pl
(866 B)
📄
mksysnum_freebsd.pl
(1.35 KB)
📄
mksysnum_linux.pl
(1.26 KB)
📄
mksysnum_netbsd.pl
(1.01 KB)
📄
mksysnum_openbsd.pl
(872 B)
📄
mksysnum_plan9.sh
(459 B)
📄
mmap_unix_test.go
(500 B)
📄
msan.go
(410 B)
📄
msan0.go
(342 B)
📄
net.go
(1.19 KB)
📄
net_fake.go
(883 B)
📄
net_js.go
(1.38 KB)
📄
net_wasip1.go
(1.82 KB)
📄
netlink_linux.go
(4.77 KB)
📄
os_wasip1.go
(252 B)
📄
pwd_plan9.go
(2.27 KB)
📄
rlimit.go
(1.59 KB)
📄
rlimit_darwin.go
(593 B)
📄
rlimit_stub.go
(338 B)
📄
rlimit_test.go
(953 B)
📄
route_bsd.go
(9.1 KB)
📄
route_darwin.go
(2.01 KB)
📄
route_dragonfly.go
(2.61 KB)
📄
route_freebsd.go
(2.67 KB)
📄
route_freebsd_32bit.go
(1.14 KB)
📄
route_freebsd_64bit.go
(762 B)
📄
route_netbsd.go
(1.43 KB)
📄
route_openbsd.go
(1.46 KB)
📄
security_windows.go
(10.01 KB)
📄
setuidgid_32_linux.go
(435 B)
📄
setuidgid_linux.go
(421 B)
📄
sockcmsg_dragonfly.go
(547 B)
📄
sockcmsg_linux.go
(1.12 KB)
📄
sockcmsg_unix.go
(2.51 KB)
📄
sockcmsg_unix_other.go
(1.08 KB)
📄
syscall.go
(3.78 KB)
📄
syscall_aix.go
(17.9 KB)
📄
syscall_aix_ppc64.go
(405 B)
📄
syscall_bsd.go
(13.63 KB)
📄
syscall_bsd_test.go
(1.17 KB)
📄
syscall_darwin.go
(10.74 KB)
📄
syscall_darwin_amd64.go
(1.91 KB)
📄
syscall_darwin_arm64.go
(1.82 KB)
📄
syscall_dragonfly.go
(8.55 KB)
📄
syscall_dragonfly_amd64.go
(1.12 KB)
📄
syscall_freebsd.go
(8.72 KB)
📄
syscall_freebsd_386.go
(1.17 KB)
📄
syscall_freebsd_amd64.go
(1.12 KB)
📄
syscall_freebsd_arm.go
(1.16 KB)
📄
syscall_freebsd_arm64.go
(1.12 KB)
📄
syscall_freebsd_riscv64.go
(1.12 KB)
📄
syscall_freebsd_test.go
(424 B)
📄
syscall_illumos.go
(613 B)
📄
syscall_js.go
(6.71 KB)
📄
syscall_linux.go
(35.62 KB)
📄
syscall_linux_386.go
(10.34 KB)
📄
syscall_linux_accept.go
(961 B)
📄
syscall_linux_accept4.go
(592 B)
📄
syscall_linux_amd64.go
(4.78 KB)
📄
syscall_linux_arm.go
(7.05 KB)
📄
syscall_linux_arm64.go
(6.21 KB)
📄
syscall_linux_loong64.go
(7.08 KB)
📄
syscall_linux_mips64x.go
(5.98 KB)
📄
syscall_linux_mipsx.go
(6.85 KB)
📄
syscall_linux_ppc64x.go
(4.63 KB)
📄
syscall_linux_riscv64.go
(5.75 KB)
📄
syscall_linux_s390x.go
(7.9 KB)
📄
syscall_linux_test.go
(21.1 KB)
📄
syscall_netbsd.go
(7.78 KB)
📄
syscall_netbsd_386.go
(716 B)
📄
syscall_netbsd_amd64.go
(709 B)
📄
syscall_netbsd_arm.go
(716 B)
📄
syscall_netbsd_arm64.go
(709 B)
📄
syscall_openbsd.go
(6.97 KB)
📄
syscall_openbsd1.go
(534 B)
📄
syscall_openbsd_386.go
(715 B)
📄
syscall_openbsd_amd64.go
(701 B)
📄
syscall_openbsd_arm.go
(715 B)
📄
syscall_openbsd_arm64.go
(906 B)
📄
syscall_openbsd_libc.go
(3.28 KB)
📄
syscall_openbsd_mips64.go
(970 B)
📄
syscall_openbsd_ppc64.go
(906 B)
📄
syscall_openbsd_riscv64.go
(906 B)
📄
syscall_plan9.go
(9.37 KB)
📄
syscall_plan9_test.go
(1.15 KB)
📄
syscall_ptrace_test.go
(768 B)
📄
syscall_solaris.go
(15.66 KB)
📄
syscall_solaris_amd64.go
(487 B)
📄
syscall_solarisonly.go
(304 B)
📄
syscall_test.go
(1.44 KB)
📄
syscall_unix.go
(12.11 KB)
📄
syscall_unix_test.go
(9.43 KB)
📄
syscall_wasip1.go
(9.37 KB)
📄
syscall_windows.go
(52.6 KB)
📄
syscall_windows_test.go
(5.73 KB)
📄
tables_js.go
(19.17 KB)
📄
tables_wasip1.go
(6.49 KB)
📄
time_fake.go
(677 B)
📄
time_nofake.go
(351 B)
📄
timestruct.go
(954 B)
📄
types_aix.go
(3.35 KB)
📄
types_darwin.go
(5.03 KB)
📄
types_dragonfly.go
(5.05 KB)
📄
types_freebsd.go
(6.72 KB)
📄
types_illumos_amd64.go
(379 B)
📄
types_linux.go
(10.9 KB)
📄
types_netbsd.go
(4.77 KB)
📄
types_openbsd.go
(5.04 KB)
📄
types_solaris.go
(4.88 KB)
📄
types_windows.go
(27.75 KB)
📄
types_windows_386.go
(477 B)
📄
types_windows_amd64.go
(477 B)
📄
types_windows_arm.go
(477 B)
📄
types_windows_arm64.go
(477 B)
📄
wtf8_windows.go
(2.67 KB)
📄
wtf8_windows_test.go
(4.31 KB)
📄
zerrors_aix_ppc64.go
(47.16 KB)
📄
zerrors_darwin_amd64.go
(55.28 KB)
📄
zerrors_darwin_arm64.go
(55.79 KB)
📄
zerrors_dragonfly_amd64.go
(59.62 KB)
📄
zerrors_freebsd_386.go
(67.35 KB)
📄
zerrors_freebsd_amd64.go
(67.4 KB)
📄
zerrors_freebsd_arm.go
(67.34 KB)
📄
zerrors_freebsd_arm64.go
(67.41 KB)
📄
zerrors_freebsd_riscv64.go
(67.41 KB)
📄
zerrors_linux_386.go
(57.36 KB)
📄
zerrors_linux_amd64.go
(57.39 KB)
📄
zerrors_linux_arm.go
(57.88 KB)
📄
zerrors_linux_arm64.go
(68.57 KB)
📄
zerrors_linux_loong64.go
(82.47 KB)
📄
zerrors_linux_mips.go
(69.18 KB)
📄
zerrors_linux_mips64.go
(68.5 KB)
📄
zerrors_linux_mips64le.go
(68.5 KB)
📄
zerrors_linux_mipsle.go
(69.18 KB)
📄
zerrors_linux_ppc64.go
(70.89 KB)
📄
zerrors_linux_ppc64le.go
(71.84 KB)
📄
zerrors_linux_riscv64.go
(70.8 KB)
📄
zerrors_linux_s390x.go
(73.28 KB)
📄
zerrors_netbsd_386.go
(67.48 KB)
📄
zerrors_netbsd_amd64.go
(67.07 KB)
📄
zerrors_netbsd_arm.go
(66.49 KB)
📄
zerrors_netbsd_arm64.go
(67.07 KB)
📄
zerrors_openbsd_386.go
(62.52 KB)
📄
zerrors_openbsd_amd64.go
(62.48 KB)
📄
zerrors_openbsd_arm.go
(62.47 KB)
📄
zerrors_openbsd_arm64.go
(66.36 KB)
📄
zerrors_openbsd_mips64.go
(66.66 KB)
📄
zerrors_openbsd_ppc64.go
(67.14 KB)
📄
zerrors_openbsd_riscv64.go
(67.1 KB)
📄
zerrors_solaris_amd64.go
(50.72 KB)
📄
zerrors_windows.go
(9.97 KB)
📄
zsyscall_aix_ppc64.go
(41.4 KB)
📄
zsyscall_darwin_amd64.go
(51.72 KB)
📄
zsyscall_darwin_amd64.s
(8.7 KB)
📄
zsyscall_darwin_arm64.go
(51.67 KB)
📄
zsyscall_darwin_arm64.s
(8.67 KB)
📄
zsyscall_dragonfly_amd64.go
(31.67 KB)
📄
zsyscall_freebsd_386.go
(31.21 KB)
📄
zsyscall_freebsd_amd64.go
(31.07 KB)
📄
zsyscall_freebsd_arm.go
(31.23 KB)
📄
zsyscall_freebsd_arm64.go
(31.07 KB)
📄
zsyscall_freebsd_riscv64.go
(31.07 KB)
📄
zsyscall_linux_386.go
(34.68 KB)
📄
zsyscall_linux_amd64.go
(39.5 KB)
📄
zsyscall_linux_arm.go
(38.92 KB)
📄
zsyscall_linux_arm64.go
(37.81 KB)
📄
zsyscall_linux_loong64.go
(37.08 KB)
📄
zsyscall_linux_mips.go
(40.34 KB)
📄
zsyscall_linux_mips64.go
(40.34 KB)
📄
zsyscall_linux_mips64le.go
(40.35 KB)
📄
zsyscall_linux_mipsle.go
(40.34 KB)
📄
zsyscall_linux_ppc64.go
(40.98 KB)
📄
zsyscall_linux_ppc64le.go
(40.99 KB)
📄
zsyscall_linux_riscv64.go
(37.84 KB)
📄
zsyscall_linux_s390x.go
(35.3 KB)
📄
zsyscall_netbsd_386.go
(30.11 KB)
📄
zsyscall_netbsd_amd64.go
(29.97 KB)
📄
zsyscall_netbsd_arm.go
(30.12 KB)
📄
zsyscall_netbsd_arm64.go
(29.97 KB)
📄
zsyscall_openbsd_386.go
(48.07 KB)
📄
zsyscall_openbsd_386.s
(8.09 KB)
📄
zsyscall_openbsd_amd64.go
(47.92 KB)
📄
zsyscall_openbsd_amd64.s
(8.09 KB)
📄
zsyscall_openbsd_arm.go
(48.09 KB)
📄
zsyscall_openbsd_arm.s
(8.09 KB)
📄
zsyscall_openbsd_arm64.go
(47.92 KB)
📄
zsyscall_openbsd_arm64.s
(8.09 KB)
📄
zsyscall_openbsd_mips64.go
(30.05 KB)
📄
zsyscall_openbsd_ppc64.go
(47.92 KB)
📄
zsyscall_openbsd_ppc64.s
(8.78 KB)
📄
zsyscall_openbsd_riscv64.go
(47.93 KB)
📄
zsyscall_openbsd_riscv64.s
(8.09 KB)
📄
zsyscall_plan9_386.go
(6.17 KB)
📄
zsyscall_plan9_amd64.go
(6.18 KB)
📄
zsyscall_plan9_arm.go
(6.17 KB)
📄
zsyscall_solaris_amd64.go
(37.56 KB)
📄
zsyscall_windows.go
(56.73 KB)
📄
zsysctl_openbsd.go
(11.39 KB)
📄
zsysnum_darwin_amd64.go
(14.55 KB)
📄
zsysnum_darwin_arm64.go
(14.39 KB)
📄
zsysnum_dragonfly_amd64.go
(22.94 KB)
📄
zsysnum_freebsd_386.go
(25.46 KB)
📄
zsysnum_freebsd_amd64.go
(25.46 KB)
📄
zsysnum_freebsd_arm.go
(25.46 KB)
📄
zsysnum_freebsd_arm64.go
(35.79 KB)
📄
zsysnum_freebsd_riscv64.go
(35.79 KB)
📄
zsysnum_linux_386.go
(11.27 KB)
📄
zsysnum_linux_amd64.go
(10.11 KB)
📄
zsysnum_linux_arm.go
(11.55 KB)
📄
zsysnum_linux_arm64.go
(8.95 KB)
📄
zsysnum_linux_loong64.go
(10.28 KB)
📄
zsysnum_linux_mips.go
(12.1 KB)
📄
zsysnum_linux_mips64.go
(10.93 KB)
📄
zsysnum_linux_mips64le.go
(10.93 KB)
📄
zsysnum_linux_mipsle.go
(12.1 KB)
📄
zsysnum_linux_ppc64.go
(11.47 KB)
📄
zsysnum_linux_ppc64le.go
(11.49 KB)
📄
zsysnum_linux_riscv64.go
(8.88 KB)
📄
zsysnum_linux_s390x.go
(10.64 KB)
📄
zsysnum_netbsd_386.go
(25.69 KB)
📄
zsysnum_netbsd_amd64.go
(25.69 KB)
📄
zsysnum_netbsd_arm.go
(25.69 KB)
📄
zsysnum_netbsd_arm64.go
(25.69 KB)
📄
zsysnum_openbsd_386.go
(14.16 KB)
📄
zsysnum_openbsd_amd64.go
(14.16 KB)
📄
zsysnum_openbsd_arm.go
(14.46 KB)
📄
zsysnum_openbsd_arm64.go
(14.72 KB)
📄
zsysnum_openbsd_mips64.go
(14.93 KB)
📄
zsysnum_openbsd_ppc64.go
(15.83 KB)
📄
zsysnum_openbsd_riscv64.go
(15.67 KB)
📄
zsysnum_plan9.go
(1.03 KB)
📄
zsysnum_solaris_amd64.go
(293 B)
📄
ztypes_aix_ppc64.go
(4.17 KB)
📄
ztypes_darwin_amd64.go
(6.95 KB)
📄
ztypes_darwin_arm64.go
(6.95 KB)
📄
ztypes_dragonfly_amd64.go
(6.7 KB)
📄
ztypes_freebsd_386.go
(8 KB)
📄
ztypes_freebsd_amd64.go
(8.03 KB)
📄
ztypes_freebsd_arm.go
(8.03 KB)
📄
ztypes_freebsd_arm64.go
(8.03 KB)
📄
ztypes_freebsd_riscv64.go
(8.03 KB)
📄
ztypes_linux_386.go
(11.58 KB)
📄
ztypes_linux_amd64.go
(11.95 KB)
📄
ztypes_linux_arm.go
(11.47 KB)
📄
ztypes_linux_arm64.go
(10.16 KB)
📄
ztypes_linux_loong64.go
(10.77 KB)
📄
ztypes_linux_mips.go
(9.96 KB)
📄
ztypes_linux_mips64.go
(10.08 KB)
📄
ztypes_linux_mips64le.go
(10.08 KB)
📄
ztypes_linux_mipsle.go
(9.96 KB)
📄
ztypes_linux_ppc64.go
(10.25 KB)
📄
ztypes_linux_ppc64le.go
(10.38 KB)
📄
ztypes_linux_riscv64.go
(10.23 KB)
📄
ztypes_linux_s390x.go
(10.44 KB)
📄
ztypes_netbsd_386.go
(5.99 KB)
📄
ztypes_netbsd_amd64.go
(6.17 KB)
📄
ztypes_netbsd_arm.go
(6.13 KB)
📄
ztypes_netbsd_arm64.go
(6.17 KB)
📄
ztypes_openbsd_386.go
(6.73 KB)
📄
ztypes_openbsd_amd64.go
(6.89 KB)
📄
ztypes_openbsd_arm.go
(6.84 KB)
📄
ztypes_openbsd_arm64.go
(6.66 KB)
📄
ztypes_openbsd_mips64.go
(6.66 KB)
📄
ztypes_openbsd_ppc64.go
(6.69 KB)
📄
ztypes_openbsd_riscv64.go
(6.69 KB)
📄
ztypes_solaris_amd64.go
(5.57 KB)
Editing: wtf8_windows.go
// Copyright 2023 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. // Windows UTF-16 strings can contain unpaired surrogates, which can't be // decoded into a valid UTF-8 string. This file defines a set of functions // that can be used to encode and decode potentially ill-formed UTF-16 strings // by using the [the WTF-8 encoding](https://simonsapin.github.io/wtf-8/). // // WTF-8 is a strict superset of UTF-8, i.e. any string that is // well-formed in UTF-8 is also well-formed in WTF-8 and the content // is unchanged. Also, the conversion never fails and is lossless. // // The benefit of using WTF-8 instead of UTF-8 when decoding a UTF-16 string // is that the conversion is lossless even for ill-formed UTF-16 strings. // This property allows to read an ill-formed UTF-16 string, convert it // to a Go string, and convert it back to the same original UTF-16 string. // // See go.dev/issues/59971 for more info. package syscall import ( "unicode/utf16" "unicode/utf8" ) const ( surr1 = 0xd800 surr2 = 0xdc00 surr3 = 0xe000 tx = 0b10000000 t3 = 0b11100000 maskx = 0b00111111 mask3 = 0b00001111 rune1Max = 1<<7 - 1 rune2Max = 1<<11 - 1 ) // encodeWTF16 returns the potentially ill-formed // UTF-16 encoding of s. func encodeWTF16(s string, buf []uint16) []uint16 { for i := 0; i < len(s); { // Cannot use 'for range s' because it expects valid // UTF-8 runes. r, size := utf8.DecodeRuneInString(s[i:]) if r == utf8.RuneError { // Check if s[i:] contains a valid WTF-8 encoded surrogate. if sc := s[i:]; len(sc) >= 3 && sc[0] == 0xED && 0xA0 <= sc[1] && sc[1] <= 0xBF && 0x80 <= sc[2] && sc[2] <= 0xBF { r = rune(sc[0]&mask3)<<12 + rune(sc[1]&maskx)<<6 + rune(sc[2]&maskx) buf = append(buf, uint16(r)) i += 3 continue } } i += size buf = utf16.AppendRune(buf, r) } return buf } // decodeWTF16 returns the WTF-8 encoding of // the potentially ill-formed UTF-16 s. func decodeWTF16(s []uint16, buf []byte) []byte { for i := 0; i < len(s); i++ { var ar rune switch r := s[i]; { case r < surr1, surr3 <= r: // normal rune ar = rune(r) case surr1 <= r && r < surr2 && i+1 < len(s) && surr2 <= s[i+1] && s[i+1] < surr3: // valid surrogate sequence ar = utf16.DecodeRune(rune(r), rune(s[i+1])) i++ default: // WTF-8 fallback. // This only handles the 3-byte case of utf8.AppendRune, // as surrogates always fall in that case. ar = rune(r) if ar > utf8.MaxRune { ar = utf8.RuneError } buf = append(buf, t3|byte(ar>>12), tx|byte(ar>>6)&maskx, tx|byte(ar)&maskx) continue } buf = utf8.AppendRune(buf, ar) } return buf }
Upload File
Create Folder