]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.unified] all: merge master (85d87b9) into dev.unified
authorMatthew Dempsky <mdempsky@google.com>
Thu, 4 Aug 2022 17:12:28 +0000 (10:12 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 4 Aug 2022 17:12:28 +0000 (10:12 -0700)
Merge List:

+ 2022-08-04 85d87b9c75 all: update vendored golang.org/x dependencies for Go 1.20 development
+ 2022-08-04 fb1bfd4d37 all: remove pre-Go 1.17 workarounds
+ 2022-08-04 44ff9bff0c runtime: clean up panic and deadlock lock ranks
+ 2022-08-04 f42dc0de74 runtime: make the lock rank DAG make more sense
+ 2022-08-04 d29a0282e9 runtime: add mayAcquire annotation for finlock
+ 2022-08-04 c5be4ed7df runtime: add missing trace lock edges
+ 2022-08-04 2b8a9a484f runtime: generate the lock ranking from a DAG description
+ 2022-08-04 ddfd639408 runtime: delete unused lock ranks
+ 2022-08-04 426ea5702b internal/dag: add a Graph type and make node order deterministic
+ 2022-08-04 d37cc9a8cd go/build, internal/dag: lift DAG parser into an internal package
+ 2022-08-04 ab0a94c6d3 cmd/dist: require Go 1.17 for building Go
+ 2022-08-04 1e3c19f3fe runtime: support riscv64 SV57 mode
+ 2022-08-03 f28fa952b5 make.bat, make.rc: show bootstrap toolchain version
+ 2022-08-03 87384801dc cmd/asm: update package doc to describe "-p" option
+ 2022-08-03 c6a2dada0d net: disable TestIPv6WriteMsgUDPAddrPortTargetAddrIPVersion [sic] on DragonflyBSD
+ 2022-08-02 29b9a328d2 runtime: trivial replacements of g in remaining files
+ 2022-08-02 c647264619 runtime: trivial replacements of g in signal_unix.go
+ 2022-08-02 399f50c9d7 runtime: tricky replacements of g in traceback.go
+ 2022-08-02 4509e951ec runtime: tricky replacements of g in proc.go
+ 2022-08-02 4400238ec8 runtime: trivial replacements of _g_ in remaining files
+ 2022-08-02 5999a28de8 runtime: trivial replacements of _g_ in os files
+ 2022-08-02 0e18cf6d09 runtime: trivial replacements of _g_ in GC files
+ 2022-08-02 4358a53a97 runtime: trivial replacements of _g_ in proc.go
+ 2022-08-02 b486518964 runtime: tricky replacements of _g_ in os3_solaris.go
+ 2022-08-02 54a0ab3f7b runtime: tricky replacements of _g_ in os3_plan9.go
+ 2022-08-02 4240ff764b runtime: tricky replacements of _g_ in signal_windows.go
+ 2022-08-02 8666d89ca8 runtime: tricky replacements of _g_ in signal_unix.go
+ 2022-08-02 74cee276fe runtime: tricky replacements of _g_ in trace.go
+ 2022-08-02 222799fde6 runtime: tricky replacements of _g_ in mgc.go
+ 2022-08-02 e9d7f54a1a runtime: tricky replacements of _g_ in proc.go
+ 2022-08-02 5e8d261918 runtime: rename _p_ to pp
+ 2022-08-02 0ad2ec6596 runtime: clean up dopanic_m
+ 2022-08-02 7e952962df runtime: clean up canpanic
+ 2022-08-02 9dbc0f3556 runtime: fix outdated g.m comment in traceback.go
+ 2022-08-02 d723df76da internal/goversion: update Version to 1.20
+ 2022-08-02 1b7e71e8ae all: disable tests that fail on Alpine
+ 2022-08-01 f2a9f3e2e0 test: improve generic type assertion test
+ 2022-08-01 27038b70f8 cmd/compile: fix wrong dict pass condition for type assertions
+ 2022-08-01 e99f53fed9 doc: move Go 1.19 release notes to x/website
+ 2022-08-01 8b13a073a1 doc: mention removal of cmd/compile's -importmap and -installsuffix flags
+ 2022-08-01 e95fd4c238 doc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCH
+ 2022-08-01 dee3efd9f8 doc/go1.19: fix a few links that were missing trailing slashes
+ 2022-07-30 f32519e5fb runtime: fix typos
+ 2022-07-29 9a2001a8cc cmd/dist: always pass -short=true with -quick
+ 2022-07-28 5c8ec89cb5 doc/go1.19: minor adjustments and links
+ 2022-07-28 417be37048 doc/go1.19: improve the loong64 release notes
+ 2022-07-28 027855e8d8 os/exec: add GODEBUG setting to opt out of ErrDot changes

Change-Id: Idc0fbe93978c0dff7600b90a2c3ecc067fd9f5f2

199 files changed:
doc/go1.19.html [deleted file]
misc/cgo/test/issue1435.go
misc/cgo/test/pkg_test.go
misc/cgo/testcarchive/carchive_test.go
misc/cgo/testcshared/cshared_test.go
src/cmd/asm/doc.go
src/cmd/compile/internal/gc/bootstrap.go [deleted file]
src/cmd/compile/internal/gc/pprof.go [deleted file]
src/cmd/compile/internal/gc/trace.go [deleted file]
src/cmd/compile/internal/gc/util.go
src/cmd/compile/internal/logopt/escape.go [deleted file]
src/cmd/compile/internal/logopt/escape_bootstrap.go [deleted file]
src/cmd/compile/internal/logopt/log_opts.go
src/cmd/compile/internal/noder/stencil.go
src/cmd/dist/notgo117.go [new file with mode: 0644]
src/cmd/dist/test.go
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/arch/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/arch/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/crypto/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/crypto/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/sync/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/sync/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/sys/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/sys/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_386.go [deleted file]
src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go [deleted file]
src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go [deleted file]
src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go [deleted file]
src/cmd/vendor/golang.org/x/sys/unix/mkall.sh
src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh
src/cmd/vendor/golang.org/x/sys/unix/syscall_aix.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_bsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/syscall_illumos.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_solaris.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go
src/cmd/vendor/golang.org/x/sys/windows/types_windows.go
src/cmd/vendor/golang.org/x/sys/windows/zsyscall_windows.go
src/cmd/vendor/golang.org/x/term/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/term/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/term/terminal.go
src/cmd/vendor/golang.org/x/tools/AUTHORS [deleted file]
src/cmd/vendor/golang.org/x/tools/CONTRIBUTORS [deleted file]
src/cmd/vendor/golang.org/x/tools/go/analysis/doc.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go [deleted file]
src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go [deleted file]
src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/symbol.go [deleted file]
src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go [new file with mode: 0644]
src/cmd/vendor/modules.txt
src/go.mod
src/go.sum
src/go/build/deps_test.go
src/internal/dag/alg.go [new file with mode: 0644]
src/internal/dag/alg_test.go [new file with mode: 0644]
src/internal/dag/parse.go [new file with mode: 0644]
src/internal/dag/parse_test.go [new file with mode: 0644]
src/internal/goversion/goversion.go
src/internal/pkgbits/frames_go1.go [deleted file]
src/internal/pkgbits/frames_go17.go [deleted file]
src/internal/pkgbits/sync.go
src/make.bat
src/make.rc
src/net/udpsock_test.go
src/os/exec/dot_test.go
src/os/exec/exec.go
src/os/exec/lp_plan9.go
src/os/exec/lp_unix.go
src/os/exec/lp_windows.go
src/runtime/cgocheck.go
src/runtime/chan.go
src/runtime/debug.go
src/runtime/export_debuglog_test.go
src/runtime/export_test.go
src/runtime/heapdump.go
src/runtime/lfstack_64bit.go
src/runtime/lockrank.go
src/runtime/lockrank_on.go
src/runtime/lockrank_test.go
src/runtime/malloc.go
src/runtime/mbitmap.go
src/runtime/mfinal.go
src/runtime/mgc.go
src/runtime/mgcmark.go
src/runtime/mgcpacer.go
src/runtime/mgcsweep.go
src/runtime/mklockrank.go [new file with mode: 0644]
src/runtime/msan.go
src/runtime/mwbbuf.go
src/runtime/os2_aix.go
src/runtime/os3_plan9.go
src/runtime/os3_solaris.go
src/runtime/os_js.go
src/runtime/os_netbsd.go
src/runtime/os_openbsd.go
src/runtime/os_plan9.go
src/runtime/panic.go
src/runtime/proc.go
src/runtime/race.go
src/runtime/rdebug.go
src/runtime/runtime.go
src/runtime/runtime1.go
src/runtime/runtime_test.go
src/runtime/signal_unix.go
src/runtime/signal_windows.go
src/runtime/testdata/testprog/vdso.go
src/runtime/trace.go
src/runtime/traceback.go
src/sort/slice.go
src/sort/slice_go113.go [deleted file]
src/sort/slice_go14.go [deleted file]
src/sort/slice_go18.go [deleted file]
src/syscall/syscall_linux_test.go
src/vendor/golang.org/x/crypto/AUTHORS [deleted file]
src/vendor/golang.org/x/crypto/CONTRIBUTORS [deleted file]
src/vendor/golang.org/x/crypto/curve25519/curve25519.go
src/vendor/golang.org/x/sys/AUTHORS [deleted file]
src/vendor/golang.org/x/sys/CONTRIBUTORS [deleted file]
src/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go [new file with mode: 0644]
src/vendor/golang.org/x/text/AUTHORS [deleted file]
src/vendor/golang.org/x/text/CONTRIBUTORS [deleted file]
src/vendor/modules.txt
test/typeparam/issue54135.go [new file with mode: 0644]

diff --git a/doc/go1.19.html b/doc/go1.19.html
deleted file mode 100644 (file)
index de1dfef..0000000
+++ /dev/null
@@ -1,985 +0,0 @@
-<!--{
-       "Title": "Go 1.19 Release Notes",
-       "Path":  "/doc/go1.19"
-}-->
-<!--
-NOTE: In this document and others in this directory, the convention is to
-set fixed-width phrases with non-fixed-width spaces, as in
-<code>hello</code> <code>world</code>.
-Do not send CLs removing the interior tags from such phrases.
--->
-<style>
-  main ul li { margin: 0.5em 0; }
-</style>
-<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.19</h2>
-<p>
-  <strong>
-    Go 1.19 is not yet released. These are work-in-progress
-    release notes. Go 1.19 is expected to be released in August 2022.
-  </strong>
-</p>
-
-<h2 id="language">Changes to the language</h2>
-
-<p><!-- https://go.dev/issue/52038 -->
-  There is only one small change to the language,
-  a <a href="https://github.com/golang/go/issues/52038">very small correction</a>
-  to the <a href="/ref/spec#Declarations_and_scope">scope of type parameters in method declarations</a>.
-  Existing programs are unaffected.
-</p>
-
-<h2 id="mem">Memory Model</h2>
-
-<p><!-- https://go.dev/issue/50859 -->
-  The <a href="/ref/mem">Go memory model</a> has been revised to align Go with
-  the memory model used by C, C++, Java, JavaScript, Rust, and Swift.
-  Go only provides sequentially consistent atomics, not any of the more relaxed forms found in other languages.
-  Along with the memory model update,
-  Go 1.19 introduces <a href="#atomic_types">new types in the <code>sync/atomic</code> package</a>
-  that make it easier to use atomic values, such as
-  <a href="/pkg/sync/atomic/#Int64">atomic.Int64</a>
-  and
-  <a href="/pkg/sync/atomic/#Pointer">atomic.Pointer[T]</a>.
-</p>
-
-<h2 id="ports">Ports</h2>
-
-<h3 id="loong64">Loongson 64-bit</h3>
-<p><!-- https://go.dev/issue/46229 -->
-  Go 1.19 adds support for the Loongson 64-bit architecture LoongArch
-  on Linux (<code>GOOS=linux</code>, <code>GOARCH=loong64</code>).
-</p>
-
-<h3 id="riscv64">RISC-V</h3>
-<p><!-- CL 402374 -->
-  The <code>riscv64</code> port now supports passing function arguments
-  and result using registers. Benchmarking shows typical performance
-  improvements of 10% or more on <code>riscv64</code>.
-</p>
-
-<h2 id="tools">Tools</h2>
-
-<h3 id="go-doc">Doc Comments</h3>
-
-<p><!-- https://go.dev/issue/51082 --><!-- CL 384265, CL 397276, CL 397278, CL 397279, CL 397281, CL 397284 -->
-Go 1.19 adds support for links, lists, and clearer headings in doc comments.
-As part of this change, <a href="/cmd/gofmt"><code>gofmt</code></a>
-now reformats doc comments to make their rendered meaning clearer.
-See “<a href="/doc/comment">Go Doc Comments</a>”
-for syntax details and descriptions of common mistakes now highlighted by <code>gofmt</code>.
-As another part of this change, the new package <a href="/pkg/go/doc/comment">go/doc/comment</a>
-provides parsing and reformatting of doc comments
-as well as support for rendering them to HTML, Markdown, and text.
-</p>
-
-<h3 id="go-unix">New <code>unix</code> build constraint</h3>
-
-<p><!-- CL 389934 --><!-- https://go.dev/issue/20322 --><!-- https://go.dev/issue/51572 -->
-  The build constraint <code>unix</code> is now recognized
-  in <code>//go:build</code> lines. The constraint is satisfied
-  if the target operating system, also known as <code>GOOS</code>, is
-  a Unix or Unix-like system. For the 1.19 release it is satisfied
-  if <code>GOOS</code> is one of
-  <code>aix</code>, <code>android</code>, <code>darwin</code>,
-  <code>dragonfly</code>, <code>freebsd</code>, <code>hurd</code>,
-  <code>illumos</code>, <code>ios</code>, <code>linux</code>,
-  <code>netbsd</code>, <code>openbsd</code>, or <code>solaris</code>.
-  In future releases the <code>unix</code> constraint may match
-  additional newly supported operating systems.
-</p>
-
-<h3 id="go-command">Go command</h3>
-
-<!-- https://go.dev/issue/51461 -->
-<p>
-  The <code>-trimpath</code> flag, if set, is now included in the build settings
-  stamped into Go binaries by <code>go</code> <code>build</code>, and can be
-  examined using
-  <a href="https://pkg.go.dev/cmd/go#hdr-Print_Go_version"><code>go</code> <code>version</code> <code>-m</code></a>
-  or <a href="https://pkg.go.dev/runtime/debug#ReadBuildInfo"><code>debug.ReadBuildInfo</code></a>.
-</p>
-<p>
-  <code>go</code> <code>generate</code> now sets the <code>GOROOT</code>
-  environment variable explicitly in the generator's environment, so that
-  generators can locate the correct <code>GOROOT</code> even if built
-  with <code>-trimpath</code>.
-</p>
-
-<p><!-- CL 404134 -->
-  <code>go</code> <code>test</code> and <code>go</code> <code>generate</code> now place
-  <code>GOROOT/bin</code> at the beginning of the <code>PATH</code> used for the
-  subprocess, so tests and generators that execute the <code>go</code> command
-  will resolve it to same <code>GOROOT</code>.
-</p>
-
-<p><!-- CL 398058 -->
-  <code>go</code> <code>env</code> now quotes entries that contain spaces in
-  the <code>CGO_CFLAGS</code>, <code>CGO_CPPFLAGS</code>, <code>CGO_CXXFLAGS</code>, <code>CGO_FFLAGS</code>, <code>CGO_LDFLAGS</code>,
-  and <code>GOGCCFLAGS</code> variables it reports.
-</p>
-
-<p><!-- https://go.dev/issue/29666 -->
-  <code>go</code> <code>list</code> <code>-json</code> now accepts a
-  comma-separated list of JSON fields to populate. If a list is specified,
-  the JSON output will include only those fields, and
-  <code>go</code> <code>list</code> may avoid work to compute fields that are
-  not included. In some cases, this may suppress errors that would otherwise
-  be reported.
-</p>
-
-<p><!-- CL 410821 -->
-  The <code>go</code> command now caches information necessary to load some modules,
-  which should result in a speed-up of some <code>go</code> <code>list</code> invocations.
-</p>
-
-<h3 id="vet">Vet</h3>
-
-<p><!-- https://go.dev/issue/47528 -->
-  The <code>vet</code> checker “errorsas” now reports when
-  <a href="/pkg/errors/#As"><code>errors.As</code></a> is called
-  with a second argument of type <code>*error</code>,
-  a common mistake.
-</p>
-
-<h2 id="runtime">Runtime</h2>
-
-<p><!-- https://go.dev/issue/48409 --><!-- CL 397018 -->
-  The runtime now includes support for a soft memory limit. This memory limit
-  includes the Go heap and all other memory managed by the runtime, and
-  excludes external memory sources such as mappings of the binary itself,
-  memory managed in other languages, and memory held by the operating system on
-  behalf of the Go program. This limit may be managed via
-  <a href="/pkg/runtime/debug/#SetMemoryLimit"><code>runtime/debug.SetMemoryLimit</code></a>
-  or the equivalent
-  <a href="/pkg/runtime/#hdr-Environment_Variables"><code>GOMEMLIMIT</code></a>
-  environment variable. The limit works in conjunction with
-  <a href="/pkg/runtime/debug/#SetGCPercent"><code>runtime/debug.SetGCPercent</code></a>
-  / <a href="/pkg/runtime/#hdr-Environment_Variables"><code>GOGC</code></a>,
-  and will be respected even if <code>GOGC=off</code>, allowing Go programs to
-  always make maximal use of their memory limit, improving resource efficiency
-  in some cases. See <a href="/doc/gc-guide">the GC guide</a> for
-  a detailed guide explaining the soft memory limit in more detail, as well as
-  a variety of common use-cases and scenarios. Please note that small memory
-  limits, on the order of tens of megabytes or less, are less likely to be
-  respected due to external latency factors, such as OS scheduling. See
-  <a href="https://go.dev/issue/52433">issue 52433</a> for more details. Larger
-  memory limits, on the order of hundreds of megabytes or more, are stable and
-  production-ready.
-</p>
-
-<p><!-- CL 353989 -->
-  In order to limit the effects of GC thrashing when the program's live heap
-  size approaches the soft memory limit, the Go runtime also attempts to limit
-  total GC CPU utilization to 50%, excluding idle time, choosing to use more
-  memory over preventing application progress. In practice, we expect this limit
-  to only play a role in exceptional cases, and the new
-  <a href="/pkg/runtime/metrics/#hdr-Supported_metrics">runtime metric</a>
-  <code>/gc/limiter/last-enabled:gc-cycle</code> reports when this last
-  occurred.
-</p>
-
-<p><!-- https://go.dev/issue/44163 -->
-  The runtime now schedules many fewer GC worker goroutines on idle operating
-  system threads when the application is idle enough to force a periodic GC
-  cycle.
-</p>
-
-<p><!-- https://go.dev/issue/18138 --><!-- CL 345889 -->
-  The runtime will now allocate initial goroutine stacks based on the historic
-  average stack usage of goroutines. This avoids some of the early stack growth
-  and copying needed in the average case in exchange for at most 2x wasted
-  space on below-average goroutines.
-</p>
-
-<p><!-- https://go.dev/issue/46279 --><!-- CL 393354 --><!-- CL 392415 -->
-  On Unix operating systems, Go programs that import package
-  <a href="/pkg/os/">os</a> now automatically increase the open file limit
-  (<code>RLIMIT_NOFILE</code>) to the maximum allowed value;
-  that is, they change the soft limit to match the hard limit.
-  This corrects artificially low limits set on some systems for compatibility with very old C programs using the
-  <a href="https://en.wikipedia.org/wiki/Select_(Unix)"><i>select</i></a> system call.
-  Go programs are not helped by that limit, and instead even simple programs like <code>gofmt</code>
-  often ran out of file descriptors on such systems when processing many files in parallel.
-  One impact of this change is that Go programs that in turn execute very old C programs in child processes
-  may run those programs with too high a limit.
-  This can be corrected by setting the hard limit before invoking the Go program.
-</p>
-
-<p><!-- https://go.dev/issue/51485 --><!-- CL 390421 -->
-  Unrecoverable fatal errors (such as concurrent map writes, or unlock of
-  unlocked mutexes) now print a simpler traceback excluding runtime metadata
-  (equivalent to a fatal panic) unless <code>GOTRACEBACK=system</code> or
-  <code>crash</code>. Runtime-internal fatal error tracebacks always include
-  full metadata regardless of the value of <code>GOTRACEBACK</code>
-</p>
-
-<p><!-- https://go.dev/issue/50614 --><!-- CL 395754 -->
-  Support for debugger-injected function calls has been added on ARM64,
-  enabling users to call functions from their binary in an interactive
-  debugging session when using a debugger that is updated to make use of this
-  functionality.
-</p>
-
-<p><!-- https://go.dev/issue/44853 -->
-  The <a href="/doc/go1.18#go-build-asan">address sanitizer support added in Go 1.18</a>
-  now handles function arguments and global variables more precisely.
-</p>
-
-<h2 id="compiler">Compiler</h2>
-
-<p><!-- https://go.dev/issue/5496 --><!-- CL 357330, 395714, 403979 -->
-  The compiler now uses
-  a <a href="https://en.wikipedia.org/wiki/Branch_table">jump
-  table</a> to implement large integer and string switch statements.
-  Performance improvements for the switch statement vary but can be
-  on the order of 20% faster.
-  (<code>GOARCH=amd64</code> and <code>GOARCH=arm64</code> only)
-</p>
-<p><!-- CL 391014 -->
-  The Go compiler now requires the <code>-p=importpath</code> flag to
-  build a linkable object file. This is already supplied by
-  the <code>go</code> command and by Bazel. Any other build systems
-  that invoke the Go compiler directly will need to make sure they
-  pass this flag as well.
-</p>
-
-<h2 id="assembler">Assembler</h2>
-<p><!-- CL 404298 -->
-  Like the compiler, the assembler now requires the
-  <code>-p=importpath</code> flag to build a linkable object file.
-  This is already supplied by the <code>go</code> command. Any other
-  build systems that invoke the Go assembler directly will need to
-  make sure they pass this flag as well.
-</p>
-
-<h2 id="linker">Linker</h2>
-<p><!-- https://go.dev/issue/50796, CL 380755 -->
-  On ELF platforms, the linker now emits compressed DWARF sections in
-  the standard gABI format (<code>SHF_COMPRESSED</code>), instead of
-  the legacy <code>.zdebug</code> format.
-</p>
-
-<h2 id="library">Core library</h2>
-
-<h3 id="atomic_types">New atomic types</h3>
-
-<p><!-- https://go.dev/issue/50860 --><!-- CL 381317 -->
-  The <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package defines new atomic types
-  <a href="/pkg/sync/atomic/#Bool"><code>Bool</code></a>,
-  <a href="/pkg/sync/atomic/#Int32"><code>Int32</code></a>,
-  <a href="/pkg/sync/atomic/#Int64"><code>Int64</code></a>,
-  <a href="/pkg/sync/atomic/#Uint32"><code>Uint32</code></a>,
-  <a href="/pkg/sync/atomic/#Uint64"><code>Uint64</code></a>,
-  <a href="/pkg/sync/atomic/#Uintptr"><code>Uintptr</code></a>, and
-  <a href="/pkg/sync/atomic/#Pointer"><code>Pointer</code></a>.
-  These types hide the underlying values so that all accesses are forced to use
-  the atomic APIs.
-  <a href="/pkg/sync/atomic/#Pointer"><code>Pointer</code></a> also avoids
-  the need to convert to
-  <a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code></a> at call sites.
-  <a href="/pkg/sync/atomic/#Int64"><code>Int64</code></a> and
-  <a href="/pkg/sync/atomic/#Uint64"><code>Uint64</code></a> are
-  automatically aligned to 64-bit boundaries in structs and allocated data,
-  even on 32-bit systems.
-</p>
-
-<h3 id="os-exec-path">PATH lookups</h3>
-
-<p><!-- https://go.dev/issue/43724 -->
-  <!-- CL 381374 --><!-- CL 403274 -->
-  <a href="/pkg/os/exec/#Command"><code>Command</code></a> and
-  <a href="/pkg/os/exec/#LookPath"><code>LookPath</code></a> no longer
-  allow results from a PATH search to be found relative to the current directory.
-  This removes a <a href="/blog/path-security">common source of security problems</a>
-  but may also break existing programs that depend on using, say, <code>exec.Command("prog")</code>
-  to run a binary named <code>prog</code> (or, on Windows, <code>prog.exe</code>) in the current directory.
-  See the <a href="/pkg/os/exec/"><code>os/exec</code></a> package documentation for
-  information about how best to update such programs.
-</p>
-
-<p><!-- https://go.dev/issue/43947 -->
-  On Windows, <code>Command</code> and <code>LookPath</code> now respect the
-  <a href="https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-needcurrentdirectoryforexepatha"><code>NoDefaultCurrentDirectoryInExePath</code></a>
-  environment variable, making it possible to disable
-  the default implicit search of “<code>.</code>” in PATH lookups on Windows systems.
-</p>
-
-<h3 id="minor_library_changes">Minor changes to the library</h3>
-<p>
-  As always, there are various minor changes and updates to the library,
-  made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
-  in mind.
-  There are also various performance improvements, not enumerated here.
-</p>
-
-<dl id="archive/zip"><dt><a href="/pkg/archive/zip/">archive/zip</a></dt>
-  <dd>
-    <p><!-- CL 387976 -->
-      <a href="/pkg/archive/zip/#Reader"><code>Reader</code></a>
-      now ignores non-ZIP data at the start of a ZIP file, matching most other implementations.
-      This is necessary to read some Java JAR files, among other uses.
-    </p>
-  </dd>
-</dl><!-- archive/zip -->
-
-<dl id="crypto/elliptic"><dt><a href="/pkg/crypto/elliptic/">crypto/elliptic</a></dt>
-  <dd>
-    <p><!-- CL 382995 -->
-      Operating on invalid curve points (those for which the
-      <code>IsOnCurve</code> method returns false, and which are never returned
-      by <code>Unmarshal</code> or by a <code>Curve</code> method operating on a
-      valid point) has always been undefined behavior and can lead to key
-      recovery attacks. If an invalid point is supplied to
-      <a href="/pkg/crypto/elliptic/#Marshal"><code>Marshal</code></a>,
-      <a href="/pkg/crypto/elliptic/#MarshalCompressed"><code>MarshalCompressed</code></a>,
-      <a href="/pkg/crypto/elliptic/#Curve.Add"><code>Add</code></a>,
-      <a href="/pkg/crypto/elliptic/#Curve.Double"><code>Double</code></a>, or
-      <a href="/pkg/crypto/elliptic/#Curve.ScalarMult"><code>ScalarMult</code></a>,
-      they will now panic.
-    </p>
-
-    <p><!-- golang.org/issue/52182 -->
-      <code>ScalarBaseMult</code> operations on the <code>P224</code>,
-      <code>P384</code>, and <code>P521</code> curves are now up to three
-      times faster, leading to similar speedups in some ECDSA operations. The
-      generic (not platform optimized) <code>P256</code> implementation was
-      replaced with one derived from a formally verified model; this might
-      lead to significant slowdowns on 32-bit platforms.
-    </p>
-  </dd>
-</dl><!-- crypto/elliptic -->
-
-<dl id="crypto/rand"><dt><a href="/pkg/crypto/rand/">crypto/rand</a></dt>
-  <dd>
-    <p><!-- CL 370894 --><!-- CL 390038 -->
-      <a href="/pkg/crypto/rand/#Read"><code>Read</code></a> no longer buffers
-      random data obtained from the operating system between calls. Applications
-      that perform many small reads at high frequency might choose to wrap
-      <a href="/pkg/crypto/rand/#Reader"><code>Reader</code></a> in a
-      <a href="/pkg/bufio/#Reader"><code>bufio.Reader</code></a> for performance
-      reasons, taking care to use
-      <a href="/pkg/io/#ReadFull"><code>io.ReadFull</code></a>
-      to ensure no partial reads occur.
-    </p>
-
-    <p><!-- CL 375215 -->
-      On Plan 9, <code>Read</code> has been reimplemented, replacing the ANSI
-      X9.31 algorithm with a fast key erasure generator.
-    </p>
-
-    <p><!-- CL 391554 --><!-- CL 387554 -->
-      The <a href="/pkg/crypto/rand/#Prime"><code>Prime</code></a>
-      implementation was simplified. This will lead to different outputs for the
-      same random stream compared to the previous implementation. The internals
-      of <code>Prime</code> are not stable, should not be relied upon not to
-      change, and the output is now intentionally non-deterministic with respect
-      to the input stream.
-    </p>
-  </dd>
-</dl><!-- crypto/rand -->
-
-<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
-  <dd>
-    <p><!-- CL 400974 --><!-- https://go.dev/issue/45428 -->
-      The <code>tls10default</code> <code>GODEBUG</code> option has been
-      removed. It is still possible to enable TLS 1.0 client-side by setting
-      <a href="/pkg/crypto/tls#Config.MinVersion"><code>Config.MinVersion</code></a>.
-    </p>
-
-    <p><!-- CL 384894 -->
-      The TLS server and client now reject duplicate extensions in TLS
-      handshakes, as required by RFC 5246, Section 7.4.1.4 and RFC 8446, Section
-      4.2.
-    </p>
-  </dd>
-</dl><!-- crypto/tls -->
-
-<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
-  <dd>
-    <p><!-- CL 285872 -->
-      <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
-      no longer supports creating certificates with <code>SignatureAlgorithm</code>
-      set to <code>MD5WithRSA</code>.
-    </p>
-
-    <p><!-- CL 400494 -->
-      <code>CreateCertificate</code> no longer accepts negative serial numbers.
-    </p>
-
-    <p><!-- CL 399827 -->
-      <code>CreateCertificate</code> will not emit an empty SEQUENCE anymore
-      when the produced certificate has no extensions.
-    </p>
-
-    <p><!-- CL 396774 -->
-      Removal of the <code>x509sha1=1</code> <code>GODEBUG</code> option,
-      originally planned for Go 1.19, has been rescheduled to a future release.
-      Applications using it should work on migrating. Practical attacks against
-      SHA-1 have been demonstrated since 2017 and publicly trusted Certificate
-      Authorities have not issued SHA-1 certificates since 2015.
-    </p>
-
-    <p><!-- CL 383215 -->
-      <a href="/pkg/crypto/x509/#ParseCertificate"><code>ParseCertificate</code></a>
-      and <a href="/pkg/crypto/x509/#ParseCertificateRequest"><code>ParseCertificateRequest</code></a>
-      now reject certificates and CSRs which contain duplicate extensions.
-    </p>
-
-    <p><!-- https://go.dev/issue/46057 --><!-- https://go.dev/issue/35044 --><!-- CL 398237 --><!-- CL 400175 --><!-- CL 388915 -->
-      The new <a href="/pkg/crypto/x509/#CertPool.Clone"><code>CertPool.Clone</code></a>
-      and <a href="/pkg/crypto/x509/#CertPool.Equal"><code>CertPool.Equal</code></a>
-      methods allow cloning a <code>CertPool</code> and checking the equivalence of two
-      <code>CertPool</code>s respectively.
-    </p>
-
-    <p><!-- https://go.dev/issue/50674 --><!-- CL 390834 -->
-      The new function <a href="/pkg/crypto/x509/#ParseRevocationList"><code>ParseRevocationList</code></a>
-      provides a faster, safer to use CRL parser which returns a
-      <a href="/pkg/crypto/x509/#RevocationList"><code>RevocationList</code></a>.
-      Parsing a CRL also populates the new <code>RevocationList</code> fields
-      <code>RawIssuer</code>, <code>Signature</code>,
-      <code>AuthorityKeyId</code>, and <code>Extensions</code>, which are ignored by
-      <a href="/pkg/crypto/x509/#CreateRevocationList"><code>CreateRevocationList</code></a>.
-    </p><p>
-      The new method <a href="/pkg/crypto/x509/#RevocationList.CheckSignatureFrom"><code>RevocationList.CheckSignatureFrom</code></a>
-      checks that the signature on a CRL is a valid signature from a
-      <a href="/pkg/crypto/x509/#Certificate"><code>Certificate</code></a>.
-    </p><p>
-      The <a href="/pkg/crypto/x509/#ParseCRL"><code>ParseCRL</code></a> and
-      <a href="/pkg/crypto/x509/#ParseDERCRL"><code>ParseDERCRL</code></a> functions
-      are now deprecated in favor of <code>ParseRevocationList</code>.
-      The <a href="/pkg/crypto/x509#Certificate.CheckCRLSignature"><code>Certificate.CheckCRLSignature</code></a>
-      method is deprecated in favor of <code>RevocationList.CheckSignatureFrom</code>.
-    </p>
-
-    <p><!-- CL 389555, CL 401115, CL 403554 -->
-      The path builder of <a href="/pkg/crypto/x509/#Certificate.Verify"><code>Certificate.Verify</code></a>
-      was overhauled and should now produce better chains and/or be more efficient in complicated scenarios.
-      Name constraints are now also enforced on non-leaf certificates.
-    </p>
-  </dd>
-</dl><!-- crypto/x509 -->
-
-<dl id="crypto/x509/pkix"><dt><a href="/pkg/crypto/x509/pkix">crypto/x509/pkix</a></dt>
-  <dd>
-    <p><!-- CL 390834 -->
-      The types <a href="/pkg/crypto/x509/pkix#CertificateList"><code>CertificateList</code></a> and
-      <a href="/pkg/crypto/x509/pkix#TBSCertificateList"><code>TBSCertificateList</code></a>
-      have been deprecated. The new <a href="#crypto/x509"><code>crypto/x509</code> CRL functionality</a>
-      should be used instead.
-    </p>
-  </dd>
-</dl><!-- crypto/x509/pkix -->
-
-<dl id="debug/elf"><dt><a href="/pkg/debug/elf">debug/elf</a></dt>
-  <dd>
-    <p><!-- CL 396735 -->
-      The new <code>EM_LONGARCH</code> and <code>R_LARCH_*</code> constants
-      support the loong64 port.
-    </p>
-  </dd>
-</dl><!-- debug/elf -->
-
-<dl id="debug/pe"><dt><a href="/pkg/debug/pe/">debug/pe</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51868 --><!-- CL 394534 -->
-      The new <a href="/pkg/debug/pe/#File.COFFSymbolReadSectionDefAux"><code>File.COFFSymbolReadSectionDefAux</code></a>
-      method, which returns a <a href="/pkg/debug/pe/#COFFSymbolAuxFormat5"><code>COFFSymbolAuxFormat5</code></a>,
-      provides access to COMDAT information in PE file sections.
-      These are supported by new <code>IMAGE_COMDAT_*</code> and <code>IMAGE_SCN_*</code> constants.
-    </p>
-  </dd>
-</dl><!-- debug/pe -->
-
-<dl id="encoding/binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/50601 --><!-- CL 386017 --><!-- CL 389636 -->
-      The new interface
-      <a href="/pkg/encoding/binary/#AppendByteOrder"><code>AppendByteOrder</code></a>
-      provides efficient methods for appending a <code>uint16</code>, <code>uint32</code>, or <code>uint64</code>
-      to a byte slice.
-      <a href="/pkg/encoding/binary/#BigEndian"><code>BigEndian</code></a> and
-      <a href="/pkg/encoding/binary/#LittleEndian"><code>LittleEndian</code></a> now implement this interface.
-    </p>
-    <p><!-- https://go.dev/issue/51644 --><!-- CL 400176 -->
-      Similarly, the new functions
-      <a href="/pkg/encoding/binary/#AppendUvarint"><code>AppendUvarint</code></a> and
-      <a href="/pkg/encoding/binary/#AppendVarint"><code>AppendVarint</code></a>
-      are efficient appending versions of
-      <a href="/pkg/encoding/binary/#PutUvarint"><code>PutUvarint</code></a> and
-      <a href="/pkg/encoding/binary/#PutVarint"><code>PutVarint</code></a>.
-    </p>
-  </dd>
-</dl><!-- encoding/binary -->
-
-<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/43401 --><!-- CL 405675 -->
-      The new method
-      <a href="/pkg/encoding/csv/#Reader.InputOffset"><code>Reader.InputOffset</code></a>
-      reports the reader's current input position as a byte offset,
-      analogous to <code>encoding/json</code>'s
-      <a href="/pkg/encoding/json/#Decoder.InputOffset"><code>Decoder.InputOffset</code></a>.
-    </p>
-  </dd>
-</dl><!-- encoding/csv -->
-
-<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/45628 --><!-- CL 311270 -->
-      The new method
-      <a href="/pkg/encoding/xml/#Decoder.InputPos"><code>Decoder.InputPos</code></a>
-      reports the reader's current input position as a line and column,
-      analogous to <code>encoding/csv</code>'s
-      <a href="/pkg/encoding/csv/#Decoder.FieldPos"><code>Decoder.FieldPos</code></a>.
-    </p>
-  </dd>
-</dl><!-- encoding/xml -->
-
-<dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/45754 --><!-- CL 313329 -->
-      The new function
-      <a href="/pkg/flag/#TextVar"><code>TextVar</code></a>
-      defines a flag with a value implementing
-      <a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>,
-      allowing command-line flag variables to have types such as
-      <a href="/pkg/math/big/#Int"><code>big.Int</code></a>,
-      <a href="/pkg/net/netip/#Addr"><code>netip.Addr</code></a>, and
-      <a href="/pkg/time/#Time"><code>time.Time</code></a>.
-    </p>
-  </dd>
-</dl><!-- flag -->
-
-<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/47579 --><!-- CL 406177 -->
-      The new functions
-      <a href="/pkg/fmt/#Append"><code>Append</code></a>,
-      <a href="/pkg/fmt/#Appendf"><code>Appendf</code></a>, and
-      <a href="/pkg/fmt/#Appendln"><code>Appendln</code></a>
-      append formatted data to byte slices.
-    </p>
-  </dd>
-</dl><!-- fmt -->
-
-<dl id="go/parser"><dt><a href="/pkg/go/parser/">go/parser</a></dt>
-  <dd>
-    <p><!-- CL 403696 -->
-      The parser now recognizes <code>~x</code> as a unary expression with operator
-      <a href="/pkg/go/token#TILDE">token.TILDE</a>,
-      allowing better error recovery when a type constraint such as <code>~int</code> is used in an incorrect context.
-    </p>
-  </dd>
-</dl><!-- go/parser -->
-
-<dl id="go/types"><dt><a href="/pkg/go/types/">go/types</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51682 --><!-- CL 395535 -->
-      The new methods <a href="/pkg/go/types/#Func.Origin"><code>Func.Origin</code></a>
-      and <a href="/pkg/go/types/#Var.Origin"><code>Var.Origin</code></a> return the
-      corresponding <a href="/pkg/go/types/#Object"><code>Object</code></a> of the
-      generic type for synthetic <a href="/pkg/go/types/#Func"><code>Func</code></a>
-      and <a href="/pkg/go/types/#Var"><code>Var</code></a> objects created during type
-      instantiation.
-    </p>
-    <p><!-- https://go.dev/issue/52728 --><!-- CL 404885 -->
-      It is no longer possible to produce an infinite number of distinct-but-identical
-      <a href="/pkg/go/types/#Named"><code>Named</code></a> type instantiations via
-      recursive calls to
-      <a href="/pkg/go/types/#Named.Underlying"><code>Named.Underlying</code></a> or
-      <a href="/pkg/go/types/#Named.Method"><code>Named.Method</code></a>.
-    </p>
-  </dd>
-</dl><!-- go/types -->
-
-
-<dl id="hash/maphash"><dt><a href="/pkg/hash/maphash/">hash/maphash</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/42710 --><!-- CL 392494 -->
-      The new functions
-      <a href="/pkg/hash/maphash/#Bytes"><code>Bytes</code></a>
-      and
-      <a href="/pkg/hash/maphash/#String"><code>String</code></a>
-      provide an efficient way hash a single byte slice or string.
-      They are equivalent to using the more general
-      <a href="/pkg/hash/maphash/#Hash"><code>Hash</code></a>
-      with a single write, but they avoid setup overhead for small inputs.
-    </p>
-  </dd>
-</dl><!-- hash/maphash -->
-
-<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/46121 --><!-- CL 389156 -->
-      The type <a href="/pkg/html/template/#FuncMap"><code>FuncMap</code></a>
-      is now an alias for
-      <code>text/template</code>'s <a href="/pkg/text/template/#FuncMap"><code>FuncMap</code></a>
-      instead of its own named type.
-      This allows writing code that operates on a <code>FuncMap</code> from either setting.
-    </p>
-  </dd>
-</dl><!-- html/template -->
-
-<dl id="image/draw"><dt><a href="/pkg/image/draw/">image/draw</a></dt>
-  <dd>
-    <p><!-- CL 396795 -->
-      <a href="/pkg/image/draw/#Draw"><code>Draw</code></a> with the
-      <a href="/pkg/image/draw/#Src"><code>Src</code></a> operator preserves
-      non-premultiplied-alpha colors when destination and source images are
-      both <a href="/pkg/image/#NRGBA"><code>image.NRGBA</code></a>
-      or both <a href="/pkg/image/#NRGBA64"><code>image.NRGBA64</code></a>.
-      This reverts a behavior change accidentally introduced by a Go 1.18
-      library optimization; the code now matches the behavior in Go 1.17 and earlier.
-    </p>
-  </dd>
-</dl><!-- image/draw -->
-
-<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51566 --><!-- CL 400236 -->
-      <a href="/pkg/io/#NopCloser"><code>NopCloser</code></a>'s result now implements
-      <a href="/pkg/io/#WriterTo"><code>WriterTo</code></a>
-      whenever its input does.
-    </p>
-
-    <p><!-- https://go.dev/issue/50842 -->
-      <a href="/pkg/io/#MultiReader"><code>MultiReader</code></a>'s result now implements
-      <a href="/pkg/io/#WriterTo"><code>WriterTo</code></a> unconditionally.
-      If any underlying reader does not implement <code>WriterTo</code>,
-      it is simulated appropriately.
-    </p>
-  </dd>
-</dl><!-- io -->
-
-<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
-  <dd>
-    <p><!-- CL 406894 -->
-      On Windows only, the mime package now ignores a registry entry
-      recording that the extension <code>.js</code> should have MIME
-      type <code>text/plain</code>. This is a common unintentional
-      misconfiguration on Windows systems. The effect is
-      that <code>.js</code> will have the default MIME
-      type <code>text/javascript; charset=utf-8</code>.
-      Applications that expect <code>text/plain</code> on Windows must
-      now explicitly call
-      <a href="/pkg/mime/#AddExtensionType"><code>AddExtensionType</code></a>.
-    </p>
-  </dd>
-</dl>
-
-<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
-  <dd>
-    <p><!-- CL 386016 -->
-      The pure Go resolver will now use EDNS(0) to include a suggested
-      maximum reply packet length, permitting reply packets to contain
-      up to 1232 bytes (the previous maximum was 512).
-      In the unlikely event that this causes problems with a local DNS
-      resolver, setting the environment variable
-      <code>GODEBUG=netdns=cgo</code> to use the cgo-based resolver
-      should work.
-      Please report any such problems on <a href="/issue/new">the
-      issue tracker</a>.
-    </p>
-
-    <p><!-- https://go.dev/issue/51428 --><!-- CL 396877 -->
-      When a net package function or method returns an "I/O timeout"
-      error, the error will now satisfy <code>errors.Is(err,
-      context.DeadlineExceeded)</code>.  When a net package function
-      returns an "operation was canceled" error, the error will now
-      satisfy <code>errors.Is(err, context.Canceled)</code>.
-      These changes are intended to make it easier for code to test
-      for cases in which a context cancellation or timeout causes a net
-      package function or method to return an error, while preserving
-      backward compatibility for error messages.
-    </p>
-
-    <p><!-- https://go.dev/issue/33097 --><!-- CL 400654 -->
-      <a href="/pkg/net/#Resolver.PreferGo"><code>Resolver.PreferGo</code></a>
-      is now implemented on Windows and Plan 9. It previously only worked on Unix
-      platforms. Combined with
-      <a href="/pkg/net/#Dialer.Resolver"><code>Dialer.Resolver</code></a> and
-      <a href="/pkg/net/#Resolver.Dial"><code>Resolver.Dial</code></a>, it's now
-      possible to write portable programs and be in control of all DNS name lookups
-      when dialing.
-    </p>
-
-    <p>
-      The <code>net</code> package now has initial support for the <code>netgo</code>
-      build tag on Windows. When used, the package uses the Go DNS client (as used
-      by <code>Resolver.PreferGo</code>) instead of asking Windows for
-      DNS results. The upstream DNS server it discovers from Windows
-      may not yet be correct with complex system network configurations, however.
-    </p>
-  </dd>
-</dl><!-- net -->
-
-<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
-  <dd>
-    <p><!-- CL 269997 -->
-      <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter.WriteHeader</code></a>
-      now supports sending user-defined 1xx informational headers.
-    </p>
-
-    <p><!-- CL 361397 -->
-      The <code>io.ReadCloser</code> returned by
-      <a href="/pkg/net/http/#MaxBytesReader"><code>MaxBytesReader</code></a>
-      will now return the defined error type
-      <a href="/pkg/net/http/#MaxBytesError"><code>MaxBytesError</code></a>
-      when its read limit is exceeded.
-    </p>
-
-    <p><!-- CL 375354 -->
-      The HTTP client will handle a 3xx response without a
-      <code>Location</code> header by returning it to the caller,
-      rather than treating it as an error.
-    </p>
-  </dd>
-</dl><!-- net/http -->
-
-<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
-  <dd>
-    <p><!-- CL 374654 -->
-      The new
-      <a href="/pkg/net/url/#JoinPath"><code>JoinPath</code></a>
-      function and
-      <a href="/pkg/net/url/#URL.JoinPath"><code>URL.JoinPath</code></a>
-      method create a new <code>URL</code> by joining a list of path
-      elements.
-    </p>
-    <p><!-- https://go.dev/issue/46059 -->
-      The <code>URL</code> type now distinguishes between URLs with no
-      authority and URLs with an empty authority. For example,
-      <code>http:///path</code> has an empty authority (host),
-      while <code>http:/path</code> has none.
-    </p>
-    <p>
-      The new <a href="/pkg/net/url/#URL"><code>URL</code></a> field
-      <code>OmitHost</code> is set to <code>true</code> when a
-      <code>URL</code> has an empty authority.
-    </p>
-
-  </dd>
-</dl><!-- net/url -->
-
-<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/50599 --><!-- CL 401340 -->
-      A <a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a> with a non-empty <code>Dir</code> field
-      and nil <code>Env</code> now implicitly sets the <code>PWD</code> environment
-      variable for the subprocess to match <code>Dir</code>.
-    </p>
-    <p>
-      The new method <a href="/pkg/os/exec/#Cmd.Environ"><code>Cmd.Environ</code></a> reports the
-      environment that would be used to run the command, including the
-      implicitly set <code>PWD</code> variable.
-    </p>
-  </dd>
-</dl> <!-- os/exec -->
-
-<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/47066 --><!-- CL 357331 -->
-      The method <a href="/pkg/reflect/#Value.Bytes"><code>Value.Bytes</code></a>
-      now accepts addressable arrays in addition to slices.
-    </p>
-    <p><!-- CL 400954 -->
-      The methods <a href="/pkg/reflect/#Value.Len"><code>Value.Len</code></a>
-      and <a href="/pkg/reflect/#Value.Cap"><code>Value.Cap</code></a>
-      now successfully operate on a pointer to an array and return the length of that array,
-      to match what the <a href="/ref/spec#Length_and_capacity">builtin
-      <code>len</code> and <code>cap</code> functions do</a>.
-    </p>
-  </dd>
-</dl><!-- reflect -->
-
-<dl id="regexp/syntax"><dt><a href="/pkg/regexp/syntax/">regexp/syntax</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51684 --><!-- CL 401076 -->
-      Go 1.18 release candidate 1, Go 1.17.8, and Go 1.16.15 included a security fix
-      to the regular expression parser, making it reject very deeply nested expressions.
-      Because Go patch releases do not introduce new API,
-      the parser returned <a href="/pkg/regexp/syntax/#ErrInternalError"><code>syntax.ErrInternalError</code></a> in this case.
-      Go 1.19 adds a more specific error, <a href="/pkg/regexp/syntax/#ErrNestingDepth"><code>syntax.ErrNestingDepth</code></a>,
-      which the parser now returns instead.
-    </p>
-  </dd>
-</dl><!-- regexp -->
-
-<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51461 -->
-      The <a href="/pkg/runtime/#GOROOT"><code>GOROOT</code></a> function now returns the empty string
-      (instead of <code>"go"</code>) when the binary was built with
-      the <code>-trimpath</code> flag set and the <code>GOROOT</code>
-      variable is not set in the process environment.
-    </p>
-  </dd>
-</dl><!-- runtime -->
-
-<dl id="runtime/metrics"><dt><a href="/pkg/runtime/metrics/">runtime/metrics</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/47216 --><!-- CL 404305 -->
-    The new <code>/sched/gomaxprocs:threads</code>
-    <a href="/pkg/runtime/metrics/#hdr-Supported_metrics">metric</a> reports
-    the current
-    <a href="/pkg/runtime/#GOMAXPROCS"><code>runtime.GOMAXPROCS</code></a>
-    value.
-    </p>
-
-    <p><!-- https://go.dev/issue/47216 --><!-- CL 404306 -->
-    The new <code>/cgo/go-to-c-calls:calls</code>
-    <a href="/pkg/runtime/metrics/#hdr-Supported_metrics">metric</a>
-    reports the total number of calls made from Go to C. This metric is
-    identical to the
-    <a href="/pkg/runtime/#NumCgoCall"><code>runtime.NumCgoCall</code></a>
-    function.
-    </p>
-
-    <p><!-- https://go.dev/issue/48409 --><!-- CL 403614 -->
-    The new <code>/gc/limiter/last-enabled:gc-cycle</code>
-    <a href="/pkg/runtime/metrics/#hdr-Supported_metrics">metric</a>
-    reports the last GC cycle when the GC CPU limiter was enabled. See the
-    <a href="#runtime">runtime notes</a> for details about the GC CPU limiter.
-    </p>
-  </dd>
-</dl><!-- runtime/metrics -->
-
-<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/33250 --><!-- CL 387415 -->
-      Stop-the-world pause times have been significantly reduced when
-      collecting goroutine profiles, reducing the overall latency impact to the
-      application.
-    </p>
-
-    <p><!-- CL 391434 -->
-      <code>MaxRSS</code> is now reported in heap profiles for all Unix
-      operating systems (it was previously only reported for
-      <code>GOOS=android</code>, <code>darwin</code>, <code>ios</code>, and
-      <code>linux</code>).
-    </p>
-  </dd>
-</dl><!-- runtime/pprof -->
-
-<dl id="runtime/race"><dt><a href="/pkg/runtime/race/">runtime/race</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/49761 --><!-- CL 333529 -->
-      The race detector has been upgraded to use thread sanitizer
-      version v3 on all supported platforms
-      except <code>windows/amd64</code>
-      and <code>openbsd/amd64</code>, which remain on v2.
-      Compared to v2, it is now typically 1.5x to 2x faster, uses half
-      as much memory, and it supports an unlimited number of
-      goroutines.
-      On Linux, the race detector now requires at least glibc version
-      2.17 and GNU binutils 2.26.
-    </p>
-
-    <p><!-- CL 336549 -->
-      The race detector is now supported on <code>GOARCH=s390x</code>.
-    </p>
-
-    <p><!-- https://go.dev/issue/52090 -->
-      Race detector support for <code>openbsd/amd64</code> has been
-      removed from thread sanitizer upstream, so it is unlikely to
-      ever be updated from v2.
-    </p>
-  </dd>
-</dl><!-- runtime/race -->
-
-<dl id="runtime/trace"><dt><a href="/pkg/runtime/trace/">runtime/trace</a></dt>
-  <dd>
-    <p><!-- CL 400795 -->
-      When tracing and the
-      <a href="/pkg/runtime/pprof#StartCPUProfile">CPU profiler</a> are
-      enabled simultaneously, the execution trace includes CPU profile
-      samples as instantaneous events.
-    </p>
-  </dd>
-</dl><!-- runtime/trace -->
-
-<dl id="sort"><dt><a href="/pkg/sort/">sort</a></dt>
-  <dd>
-    <p><!-- CL 371574 -->
-      The sorting algorithm has been rewritten to use
-      <a href="https://arxiv.org/pdf/2106.05123.pdf">pattern-defeating quicksort</a>, which
-      is faster for several common scenarios.
-    </p>
-    <p><!-- https://go.dev/issue/50340 --><!-- CL 396514 -->
-      The new function
-      <a href="/pkg/sort/#Find"><code>Find</code></a>
-      is like
-      <a href="/pkg/sort/#Search"><code>Search</code></a>
-      but often easier to use: it returns an additional boolean reporting whether an equal value was found.
-    </p>
-  </dd>
-</dl><!-- sort -->
-
-<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
-  <dd>
-    <p><!-- CL 397255 -->
-      <a href="/pkg/strconv/#Quote"><code>Quote</code></a>
-      and related functions now quote the rune U+007F as <code>\x7f</code>,
-      not <code>\u007f</code>,
-      for consistency with other ASCII values.
-    </p>
-  </dd>
-</dl><!-- strconv -->
-
-<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51192 --><!-- CL 385796 -->
-      On PowerPC (<code>GOARCH=ppc64</code>, <code>ppc64le</code>),
-      <a href="/pkg/syscall/#Syscall"><code>Syscall</code></a>,
-      <a href="/pkg/syscall/#Syscall6"><code>Syscall6</code></a>,
-      <a href="/pkg/syscall/#RawSyscall"><code>RawSyscall</code></a>, and
-      <a href="/pkg/syscall/#RawSyscall6"><code>RawSyscall6</code></a>
-      now always return 0 for return value <code>r2</code> instead of an
-      undefined value.
-    </p>
-
-    <p><!-- CL 391434 -->
-      On AIX and Solaris, <a href="/pkg/syscall/#Getrusage"><code>Getrusage</code></a> is now defined.
-    </p>
-  </dd>
-</dl><!-- syscall -->
-
-<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
-  <dd>
-    <p><!-- https://go.dev/issue/51414 --><!-- CL 393515 -->
-      The new method
-      <a href="/pkg/time/#Duration.Abs"><code>Duration.Abs</code></a>
-      provides a convenient and safe way to take the absolute value of a duration,
-      converting −2⁶³ to 2⁶³−1.
-      (This boundary case can happen as the result of subtracting a recent time from the zero time.)
-    </p>
-    <p><!-- https://go.dev/issue/50062 --><!-- CL 405374 -->
-      The new method
-      <a href="/pkg/time/#Time.ZoneBounds"><code>Time.ZoneBounds</code></a>
-      returns the start and end times of the time zone in effect at a given time.
-      It can be used in a loop to enumerate all the known time zone transitions at a given location.
-    </p>
-  </dd>
-</dl><!-- time -->
-
-<!-- Silence these false positives from x/build/cmd/relnote: -->
-<!-- CL 382460 -->
-<!-- CL 384154 -->
-<!-- CL 384554 -->
-<!-- CL 392134 -->
-<!-- CL 392414 -->
-<!-- CL 396215 -->
-<!-- CL 403058 -->
-<!-- CL 410133 -->
-<!-- https://go.dev/issue/27837 -->
-<!-- https://go.dev/issue/38340 -->
-<!-- https://go.dev/issue/42516 -->
-<!-- https://go.dev/issue/45713 -->
-<!-- https://go.dev/issue/46654 -->
-<!-- https://go.dev/issue/48257 -->
-<!-- https://go.dev/issue/50447 -->
-<!-- https://go.dev/issue/50720 -->
-<!-- https://go.dev/issue/50792 -->
-<!-- https://go.dev/issue/51115 -->
-<!-- https://go.dev/issue/51447 -->
index 91db155c90b9836eb38042725612b9737512c28f..3fb721ac395c2df6e2234e7b7f3d08c1e3021b31 100644 (file)
@@ -10,6 +10,7 @@ package cgotest
 import (
        "fmt"
        "os"
+       "runtime"
        "sort"
        "strings"
        "syscall"
@@ -145,6 +146,11 @@ func test1435(t *testing.T) {
        if syscall.Getuid() != 0 {
                t.Skip("skipping root only test")
        }
+       if runtime.GOOS == "linux" {
+               if _, err := os.Stat("/etc/alpine-release"); err == nil {
+                       t.Skip("skipping failing test on alpine - go.dev/issue/19938")
+               }
+       }
 
        // Launch some threads in C.
        const cts = 5
index 14013a4cd962b621f6e5a9a4cade19c0504edcb6..cbc80eee7739f431342cf8750c48caa703cea708 100644 (file)
@@ -34,6 +34,10 @@ func TestCrossPackageTests(t *testing.T) {
                case "arm64":
                        t.Skip("Can't exec cmd/go subprocess on iOS.")
                }
+       case "linux":
+               if _, err := os.Stat("/etc/alpine-release"); err == nil {
+                       t.Skip("skipping failing test on alpine - go.dev/issue/39857")
+               }
        }
 
        GOPATH, err := os.MkdirTemp("", "cgotest")
index c409c317dc7dd8ae75efcb371a885a97f26e63cf..b959bc6cfa3f66792cb61b2c98c1ea1af898903d 100644 (file)
@@ -46,6 +46,13 @@ func TestMain(m *testing.M) {
                fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
                os.Exit(0)
        }
+       if runtime.GOOS == "linux" {
+               if _, err := os.Stat("/etc/alpine-release"); err == nil {
+                       fmt.Printf("SKIP - skipping failing test on alpine - go.dev/issue/19938\n")
+                       os.Exit(0)
+               }
+       }
+
        log.SetFlags(log.Lshortfile)
        os.Exit(testMain(m))
 }
index 7fbcff24dd7ce57df4c6d0d756321be11ef739c5..d6219dc2926d7e41aba3cc05c29ab3dc80896b17 100644 (file)
@@ -44,6 +44,12 @@ func testMain(m *testing.M) int {
                fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
                os.Exit(0)
        }
+       if runtime.GOOS == "linux" {
+               if _, err := os.Stat("/etc/alpine-release"); err == nil {
+                       fmt.Printf("SKIP - skipping failing test on alpine - go.dev/issue/19938\n")
+                       os.Exit(0)
+               }
+       }
 
        GOOS = goEnv("GOOS")
        GOARCH = goEnv("GOARCH")
index 098f06390901db780581932dda08da9c209e7b42..bb9166b8da981d497d6ba90ffc3b8f95affcdca1 100644 (file)
@@ -37,6 +37,8 @@ Flags:
                Write symbol ABI information to output file. Don't assemble.
        -o file
                Write output to file. The default is foo.o for /a/b/c/foo.s.
+       -p pkgpath
+               Set expected package import to pkgpath.
        -shared
                Generate code that can be linked into a shared library.
        -spectre list
diff --git a/src/cmd/compile/internal/gc/bootstrap.go b/src/cmd/compile/internal/gc/bootstrap.go
deleted file mode 100644 (file)
index 37b0d59..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2017 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.
-
-//go:build !go1.8
-// +build !go1.8
-
-package gc
-
-import (
-       "cmd/compile/internal/base"
-       "runtime"
-)
-
-func startMutexProfiling() {
-       base.Fatalf("mutex profiling unavailable in version %v", runtime.Version())
-}
diff --git a/src/cmd/compile/internal/gc/pprof.go b/src/cmd/compile/internal/gc/pprof.go
deleted file mode 100644 (file)
index 5f9b030..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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.
-
-//go:build go1.8
-// +build go1.8
-
-package gc
-
-import "runtime"
-
-func startMutexProfiling() {
-       runtime.SetMutexProfileFraction(1)
-}
diff --git a/src/cmd/compile/internal/gc/trace.go b/src/cmd/compile/internal/gc/trace.go
deleted file mode 100644 (file)
index 8cdbd4b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 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.
-
-//go:build go1.7
-// +build go1.7
-
-package gc
-
-import (
-       "os"
-       tracepkg "runtime/trace"
-
-       "cmd/compile/internal/base"
-)
-
-func init() {
-       traceHandler = traceHandlerGo17
-}
-
-func traceHandlerGo17(traceprofile string) {
-       f, err := os.Create(traceprofile)
-       if err != nil {
-               base.Fatalf("%v", err)
-       }
-       if err := tracepkg.Start(f); err != nil {
-               base.Fatalf("%v", err)
-       }
-       base.AtExit(tracepkg.Stop)
-}
index 56fd137de2374b96b9788417b809fec1e0a91388..dcac0ce79ae35a4fced71bf90b888145314b6398 100644 (file)
@@ -8,12 +8,11 @@ import (
        "os"
        "runtime"
        "runtime/pprof"
+       tracepkg "runtime/trace"
 
        "cmd/compile/internal/base"
 )
 
-var traceHandler func(string)
-
 func startProfile() {
        if base.Flag.CPUProfile != "" {
                f, err := os.Create(base.Flag.CPUProfile)
@@ -64,13 +63,20 @@ func startProfile() {
                if err != nil {
                        base.Fatalf("%v", err)
                }
-               startMutexProfiling()
+               runtime.SetMutexProfileFraction(1)
                base.AtExit(func() {
                        pprof.Lookup("mutex").WriteTo(f, 0)
                        f.Close()
                })
        }
-       if base.Flag.TraceProfile != "" && traceHandler != nil {
-               traceHandler(base.Flag.TraceProfile)
+       if base.Flag.TraceProfile != "" {
+               f, err := os.Create(base.Flag.TraceProfile)
+               if err != nil {
+                       base.Fatalf("%v", err)
+               }
+               if err := tracepkg.Start(f); err != nil {
+                       base.Fatalf("%v", err)
+               }
+               base.AtExit(tracepkg.Stop)
        }
 }
diff --git a/src/cmd/compile/internal/logopt/escape.go b/src/cmd/compile/internal/logopt/escape.go
deleted file mode 100644 (file)
index 9660e93..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2019 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.
-
-//go:build go1.8
-// +build go1.8
-
-package logopt
-
-import "net/url"
-
-func pathEscape(s string) string {
-       return url.PathEscape(s)
-}
diff --git a/src/cmd/compile/internal/logopt/escape_bootstrap.go b/src/cmd/compile/internal/logopt/escape_bootstrap.go
deleted file mode 100644 (file)
index cc04eaa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2019 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.
-
-//go:build !go1.8
-// +build !go1.8
-
-package logopt
-
-// For bootstrapping with an early version of Go
-func pathEscape(s string) string {
-       panic("This should never be called; the compiler is not fully bootstrapped if it is.")
-}
index 9fee83426f60309e88e95f5b446e9a1182f30dcc..09825e8278fd4fec9975a64170f29230cec112a3 100644 (file)
@@ -376,7 +376,7 @@ func writerForLSP(subdirpath, file string) io.WriteCloser {
        if lastdot != -1 {
                basename = basename[:lastdot]
        }
-       basename = pathEscape(basename)
+       basename = url.PathEscape(basename)
 
        // Assume a directory, make a file
        p := filepath.Join(subdirpath, basename+".json")
@@ -428,7 +428,7 @@ func FlushLoggedOpts(ctxt *obj.Link, slashPkgPath string) {
                if slashPkgPath == "" {
                        slashPkgPath = "\000"
                }
-               subdirpath := filepath.Join(dest, pathEscape(slashPkgPath))
+               subdirpath := filepath.Join(dest, url.PathEscape(slashPkgPath))
                err := os.MkdirAll(subdirpath, 0755)
                if err != nil {
                        log.Fatalf("Could not create directory %s for logging optimizer actions, %v", subdirpath, err)
index 280f7cdf1c0e2c4055cac0c2371592b19b37cfae..d3f51e00cd355cb6f9316e4a956fe2eff0f65379 100644 (file)
@@ -1357,6 +1357,9 @@ func (g *genInst) dictPass(info *instInfo) {
                        }
                case ir.ODOTTYPE, ir.ODOTTYPE2:
                        dt := m.(*ir.TypeAssertExpr)
+                       if dt.Type().IsEmptyInterface() || (dt.Type().IsInterface() && !dt.Type().HasShape()) {
+                               break
+                       }
                        if !dt.Type().HasShape() && !(dt.X.Type().HasShape() && !dt.X.Type().IsEmptyInterface()) {
                                break
                        }
diff --git a/src/cmd/dist/notgo117.go b/src/cmd/dist/notgo117.go
new file mode 100644 (file)
index 0000000..eb1c949
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2022 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.
+
+// Go 1.20 and later requires Go 1.17 as the bootstrap toolchain.
+// If cmd/dist is built using an earlier Go version, this file will be
+// included in the build and cause an error like:
+//
+// % GOROOT_BOOTSTRAP=$HOME/sdk/go1.16 ./make.bash
+// Building Go cmd/dist using /Users/rsc/sdk/go1.16. (go1.16 darwin/amd64)
+// found packages main (build.go) and building_Go_requires_Go_1_17_or_later (notgo117.go) in /Users/rsc/go/src/cmd/dist
+// %
+//
+// which is the best we can do under the circumstances.
+//
+// See go.dev/issue/44505 for more background on
+// why Go moved on from Go 1.4 for bootstrap.
+
+//go:build !go1.17
+// +build !go1.17
+
+package building_Go_requires_Go_1_17_or_later
index 976e8346ba8ac93b5fb6d9abf1ef41aee05d534b..da5b17980bcece2b44eb31ead125db8dd4cb85bc 100644 (file)
@@ -542,7 +542,7 @@ func (t *tester) registerTests() {
                        name:    testName,
                        heading: "GOMAXPROCS=2 runtime -cpu=1,2,4 -quick",
                        fn: func(dt *distTest) error {
-                               cmd := t.addCmd(dt, "src", t.goTest(), t.timeout(300), "runtime", "-cpu=1,2,4", "-quick")
+                               cmd := t.addCmd(dt, "src", t.goTest(), "-short=true", t.timeout(300), "runtime", "-cpu=1,2,4", "-quick")
                                // We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
                                // creation of first goroutines and first garbage collections in the parallel setting.
                                setEnv(cmd, "GOMAXPROCS", "2")
index 8230a3e453170e11fb155f2abb5df9a153a69e74..c444956c35b02e144e0dd5b6855b8c4026b23ce9 100644 (file)
@@ -1,18 +1,18 @@
 module cmd
 
-go 1.19
+go 1.20
 
 require (
        github.com/google/pprof v0.0.0-20220517023622-154dc81eb7b0
-       golang.org/x/arch v0.0.0-20220412001346-fc48f9fe4c15
+       golang.org/x/arch v0.0.0-20220722155209-00200b7164a7
        golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
-       golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
-       golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098
-       golang.org/x/term v0.0.0-20220411215600-e5f449aeb171
-       golang.org/x/tools v0.1.11-0.20220516163903-1e55371df567
+       golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
+       golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704
+       golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
+       golang.org/x/tools v0.1.12-0.20220725193627-2a6393fe54b3
 )
 
 require (
        github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2 // indirect
-       golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8 // indirect
+       golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
 )
index 435c3cce3bf5187c7dec6fa74488dbfb50d244b7..1c3390cb1c84762e82b8377eaa83780aabb1f770 100644 (file)
@@ -2,17 +2,17 @@ github.com/google/pprof v0.0.0-20220517023622-154dc81eb7b0 h1:XgEFTOJTsN3Li0Txfh
 github.com/google/pprof v0.0.0-20220517023622-154dc81eb7b0/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk=
 github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2 h1:rcanfLhLDA8nozr/K289V1zcntHr3V+SHlXwzz1ZI2g=
 github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
-golang.org/x/arch v0.0.0-20220412001346-fc48f9fe4c15 h1:GVfVkciLYxn5mY5EncwAe0SXUn9Rm81rRkZ0TTmn/cU=
-golang.org/x/arch v0.0.0-20220412001346-fc48f9fe4c15/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
-golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8 h1:y+mHpWoQJNAHt26Nhh6JP7hvM71IRZureyvZhoVALIs=
-golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/arch v0.0.0-20220722155209-00200b7164a7 h1:VBQqJMNMRfQsWSiCTLgz9XjAfWlgnJAPv8nsp1HF8Tw=
+golang.org/x/arch v0.0.0-20220722155209-00200b7164a7/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4=
-golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 h1:PgOr27OhUx2IRqGJ2RxAWI4dJQ7bi9cSrB82uzFzfUA=
-golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8=
-golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/tools v0.1.11-0.20220516163903-1e55371df567 h1:MksUZ/zlU+pMbsq1Sw16gK6E1aWzD0rLE+eS2SxF24Y=
-golang.org/x/tools v0.1.11-0.20220516163903-1e55371df567/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 h1:Y7NOhdqIOU8kYI7BxsgL38d0ot0raxvcW+EMQU2QrT4=
+golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc=
+golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/tools v0.1.12-0.20220725193627-2a6393fe54b3 h1:w/Sued0p1rtooa9ACDVKK2YXKdoowvAcSAMCg0uxOe4=
+golang.org/x/tools v0.1.12-0.20220725193627-2a6393fe54b3/go.mod h1:LAN4g6CAevfxH/1ahTEeded+lrzLCK8eMwlRe2NVbGM=
diff --git a/src/cmd/vendor/golang.org/x/arch/AUTHORS b/src/cmd/vendor/golang.org/x/arch/AUTHORS
deleted file mode 100644 (file)
index 2b00ddb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/arch/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/arch/CONTRIBUTORS
deleted file mode 100644 (file)
index 1fbd3e9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/src/cmd/vendor/golang.org/x/crypto/AUTHORS b/src/cmd/vendor/golang.org/x/crypto/AUTHORS
deleted file mode 100644 (file)
index 2b00ddb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/crypto/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/crypto/CONTRIBUTORS
deleted file mode 100644 (file)
index 1fbd3e9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/src/cmd/vendor/golang.org/x/sync/AUTHORS b/src/cmd/vendor/golang.org/x/sync/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/sync/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/sync/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/src/cmd/vendor/golang.org/x/sys/AUTHORS b/src/cmd/vendor/golang.org/x/sys/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/sys/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/sys/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s b/src/cmd/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
new file mode 100644 (file)
index 0000000..d560019
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2021 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.
+
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
+
+#include "textflag.h"
+
+// System call support for RISCV64 BSD
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT   ·Syscall(SB),NOSPLIT,$0-56
+       JMP     syscall·Syscall(SB)
+
+TEXT   ·Syscall6(SB),NOSPLIT,$0-80
+       JMP     syscall·Syscall6(SB)
+
+TEXT   ·Syscall9(SB),NOSPLIT,$0-104
+       JMP     syscall·Syscall9(SB)
+
+TEXT   ·RawSyscall(SB),NOSPLIT,$0-56
+       JMP     syscall·RawSyscall(SB)
+
+TEXT   ·RawSyscall6(SB),NOSPLIT,$0-80
+       JMP     syscall·RawSyscall6(SB)
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
deleted file mode 100644 (file)
index 761db66..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2017 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.
-
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
-// them here for backwards compatibility.
-
-package unix
-
-const (
-       DLT_HHDLC                         = 0x79
-       IFF_SMART                         = 0x20
-       IFT_1822                          = 0x2
-       IFT_A12MPPSWITCH                  = 0x82
-       IFT_AAL2                          = 0xbb
-       IFT_AAL5                          = 0x31
-       IFT_ADSL                          = 0x5e
-       IFT_AFLANE8023                    = 0x3b
-       IFT_AFLANE8025                    = 0x3c
-       IFT_ARAP                          = 0x58
-       IFT_ARCNET                        = 0x23
-       IFT_ARCNETPLUS                    = 0x24
-       IFT_ASYNC                         = 0x54
-       IFT_ATM                           = 0x25
-       IFT_ATMDXI                        = 0x69
-       IFT_ATMFUNI                       = 0x6a
-       IFT_ATMIMA                        = 0x6b
-       IFT_ATMLOGICAL                    = 0x50
-       IFT_ATMRADIO                      = 0xbd
-       IFT_ATMSUBINTERFACE               = 0x86
-       IFT_ATMVCIENDPT                   = 0xc2
-       IFT_ATMVIRTUAL                    = 0x95
-       IFT_BGPPOLICYACCOUNTING           = 0xa2
-       IFT_BSC                           = 0x53
-       IFT_CCTEMUL                       = 0x3d
-       IFT_CEPT                          = 0x13
-       IFT_CES                           = 0x85
-       IFT_CHANNEL                       = 0x46
-       IFT_CNR                           = 0x55
-       IFT_COFFEE                        = 0x84
-       IFT_COMPOSITELINK                 = 0x9b
-       IFT_DCN                           = 0x8d
-       IFT_DIGITALPOWERLINE              = 0x8a
-       IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-       IFT_DLSW                          = 0x4a
-       IFT_DOCSCABLEDOWNSTREAM           = 0x80
-       IFT_DOCSCABLEMACLAYER             = 0x7f
-       IFT_DOCSCABLEUPSTREAM             = 0x81
-       IFT_DS0                           = 0x51
-       IFT_DS0BUNDLE                     = 0x52
-       IFT_DS1FDL                        = 0xaa
-       IFT_DS3                           = 0x1e
-       IFT_DTM                           = 0x8c
-       IFT_DVBASILN                      = 0xac
-       IFT_DVBASIOUT                     = 0xad
-       IFT_DVBRCCDOWNSTREAM              = 0x93
-       IFT_DVBRCCMACLAYER                = 0x92
-       IFT_DVBRCCUPSTREAM                = 0x94
-       IFT_ENC                           = 0xf4
-       IFT_EON                           = 0x19
-       IFT_EPLRS                         = 0x57
-       IFT_ESCON                         = 0x49
-       IFT_ETHER                         = 0x6
-       IFT_FAITH                         = 0xf2
-       IFT_FAST                          = 0x7d
-       IFT_FASTETHER                     = 0x3e
-       IFT_FASTETHERFX                   = 0x45
-       IFT_FDDI                          = 0xf
-       IFT_FIBRECHANNEL                  = 0x38
-       IFT_FRAMERELAYINTERCONNECT        = 0x3a
-       IFT_FRAMERELAYMPI                 = 0x5c
-       IFT_FRDLCIENDPT                   = 0xc1
-       IFT_FRELAY                        = 0x20
-       IFT_FRELAYDCE                     = 0x2c
-       IFT_FRF16MFRBUNDLE                = 0xa3
-       IFT_FRFORWARD                     = 0x9e
-       IFT_G703AT2MB                     = 0x43
-       IFT_G703AT64K                     = 0x42
-       IFT_GIF                           = 0xf0
-       IFT_GIGABITETHERNET               = 0x75
-       IFT_GR303IDT                      = 0xb2
-       IFT_GR303RDT                      = 0xb1
-       IFT_H323GATEKEEPER                = 0xa4
-       IFT_H323PROXY                     = 0xa5
-       IFT_HDH1822                       = 0x3
-       IFT_HDLC                          = 0x76
-       IFT_HDSL2                         = 0xa8
-       IFT_HIPERLAN2                     = 0xb7
-       IFT_HIPPI                         = 0x2f
-       IFT_HIPPIINTERFACE                = 0x39
-       IFT_HOSTPAD                       = 0x5a
-       IFT_HSSI                          = 0x2e
-       IFT_HY                            = 0xe
-       IFT_IBM370PARCHAN                 = 0x48
-       IFT_IDSL                          = 0x9a
-       IFT_IEEE80211                     = 0x47
-       IFT_IEEE80212                     = 0x37
-       IFT_IEEE8023ADLAG                 = 0xa1
-       IFT_IFGSN                         = 0x91
-       IFT_IMT                           = 0xbe
-       IFT_INTERLEAVE                    = 0x7c
-       IFT_IP                            = 0x7e
-       IFT_IPFORWARD                     = 0x8e
-       IFT_IPOVERATM                     = 0x72
-       IFT_IPOVERCDLC                    = 0x6d
-       IFT_IPOVERCLAW                    = 0x6e
-       IFT_IPSWITCH                      = 0x4e
-       IFT_IPXIP                         = 0xf9
-       IFT_ISDN                          = 0x3f
-       IFT_ISDNBASIC                     = 0x14
-       IFT_ISDNPRIMARY                   = 0x15
-       IFT_ISDNS                         = 0x4b
-       IFT_ISDNU                         = 0x4c
-       IFT_ISO88022LLC                   = 0x29
-       IFT_ISO88023                      = 0x7
-       IFT_ISO88024                      = 0x8
-       IFT_ISO88025                      = 0x9
-       IFT_ISO88025CRFPINT               = 0x62
-       IFT_ISO88025DTR                   = 0x56
-       IFT_ISO88025FIBER                 = 0x73
-       IFT_ISO88026                      = 0xa
-       IFT_ISUP                          = 0xb3
-       IFT_L3IPXVLAN                     = 0x89
-       IFT_LAPB                          = 0x10
-       IFT_LAPD                          = 0x4d
-       IFT_LAPF                          = 0x77
-       IFT_LOCALTALK                     = 0x2a
-       IFT_LOOP                          = 0x18
-       IFT_MEDIAMAILOVERIP               = 0x8b
-       IFT_MFSIGLINK                     = 0xa7
-       IFT_MIOX25                        = 0x26
-       IFT_MODEM                         = 0x30
-       IFT_MPC                           = 0x71
-       IFT_MPLS                          = 0xa6
-       IFT_MPLSTUNNEL                    = 0x96
-       IFT_MSDSL                         = 0x8f
-       IFT_MVL                           = 0xbf
-       IFT_MYRINET                       = 0x63
-       IFT_NFAS                          = 0xaf
-       IFT_NSIP                          = 0x1b
-       IFT_OPTICALCHANNEL                = 0xc3
-       IFT_OPTICALTRANSPORT              = 0xc4
-       IFT_OTHER                         = 0x1
-       IFT_P10                           = 0xc
-       IFT_P80                           = 0xd
-       IFT_PARA                          = 0x22
-       IFT_PFLOG                         = 0xf6
-       IFT_PFSYNC                        = 0xf7
-       IFT_PLC                           = 0xae
-       IFT_POS                           = 0xab
-       IFT_PPPMULTILINKBUNDLE            = 0x6c
-       IFT_PROPBWAP2MP                   = 0xb8
-       IFT_PROPCNLS                      = 0x59
-       IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-       IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-       IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-       IFT_PROPMUX                       = 0x36
-       IFT_PROPWIRELESSP2P               = 0x9d
-       IFT_PTPSERIAL                     = 0x16
-       IFT_PVC                           = 0xf1
-       IFT_QLLC                          = 0x44
-       IFT_RADIOMAC                      = 0xbc
-       IFT_RADSL                         = 0x5f
-       IFT_REACHDSL                      = 0xc0
-       IFT_RFC1483                       = 0x9f
-       IFT_RS232                         = 0x21
-       IFT_RSRB                          = 0x4f
-       IFT_SDLC                          = 0x11
-       IFT_SDSL                          = 0x60
-       IFT_SHDSL                         = 0xa9
-       IFT_SIP                           = 0x1f
-       IFT_SLIP                          = 0x1c
-       IFT_SMDSDXI                       = 0x2b
-       IFT_SMDSICIP                      = 0x34
-       IFT_SONET                         = 0x27
-       IFT_SONETOVERHEADCHANNEL          = 0xb9
-       IFT_SONETPATH                     = 0x32
-       IFT_SONETVT                       = 0x33
-       IFT_SRP                           = 0x97
-       IFT_SS7SIGLINK                    = 0x9c
-       IFT_STACKTOSTACK                  = 0x6f
-       IFT_STARLAN                       = 0xb
-       IFT_STF                           = 0xd7
-       IFT_T1                            = 0x12
-       IFT_TDLC                          = 0x74
-       IFT_TERMPAD                       = 0x5b
-       IFT_TR008                         = 0xb0
-       IFT_TRANSPHDLC                    = 0x7b
-       IFT_TUNNEL                        = 0x83
-       IFT_ULTRA                         = 0x1d
-       IFT_USB                           = 0xa0
-       IFT_V11                           = 0x40
-       IFT_V35                           = 0x2d
-       IFT_V36                           = 0x41
-       IFT_V37                           = 0x78
-       IFT_VDSL                          = 0x61
-       IFT_VIRTUALIPADDRESS              = 0x70
-       IFT_VOICEEM                       = 0x64
-       IFT_VOICEENCAP                    = 0x67
-       IFT_VOICEFXO                      = 0x65
-       IFT_VOICEFXS                      = 0x66
-       IFT_VOICEOVERATM                  = 0x98
-       IFT_VOICEOVERFRAMERELAY           = 0x99
-       IFT_VOICEOVERIP                   = 0x68
-       IFT_X213                          = 0x5d
-       IFT_X25                           = 0x5
-       IFT_X25DDN                        = 0x4
-       IFT_X25HUNTGROUP                  = 0x7a
-       IFT_X25MLP                        = 0x79
-       IFT_X25PLE                        = 0x28
-       IFT_XETHER                        = 0x1a
-       IPPROTO_MAXID                     = 0x34
-       IPV6_FAITH                        = 0x1d
-       IPV6_MIN_MEMBERSHIPS              = 0x1f
-       IP_FAITH                          = 0x16
-       IP_MAX_SOURCE_FILTER              = 0x400
-       IP_MIN_MEMBERSHIPS                = 0x1f
-       MAP_NORESERVE                     = 0x40
-       MAP_RENAME                        = 0x20
-       NET_RT_MAXID                      = 0x6
-       RTF_PRCLONING                     = 0x10000
-       RTM_OLDADD                        = 0x9
-       RTM_OLDDEL                        = 0xa
-       RT_CACHING_CONTEXT                = 0x1
-       RT_NORTREF                        = 0x2
-       SIOCADDRT                         = 0x8030720a
-       SIOCALIFADDR                      = 0x8118691b
-       SIOCDELRT                         = 0x8030720b
-       SIOCDLIFADDR                      = 0x8118691d
-       SIOCGLIFADDR                      = 0xc118691c
-       SIOCGLIFPHYADDR                   = 0xc118694b
-       SIOCSLIFPHYADDR                   = 0x8118694a
-)
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
deleted file mode 100644 (file)
index 070f44b..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2017 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.
-
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
-// them here for backwards compatibility.
-
-package unix
-
-const (
-       DLT_HHDLC                         = 0x79
-       IFF_SMART                         = 0x20
-       IFT_1822                          = 0x2
-       IFT_A12MPPSWITCH                  = 0x82
-       IFT_AAL2                          = 0xbb
-       IFT_AAL5                          = 0x31
-       IFT_ADSL                          = 0x5e
-       IFT_AFLANE8023                    = 0x3b
-       IFT_AFLANE8025                    = 0x3c
-       IFT_ARAP                          = 0x58
-       IFT_ARCNET                        = 0x23
-       IFT_ARCNETPLUS                    = 0x24
-       IFT_ASYNC                         = 0x54
-       IFT_ATM                           = 0x25
-       IFT_ATMDXI                        = 0x69
-       IFT_ATMFUNI                       = 0x6a
-       IFT_ATMIMA                        = 0x6b
-       IFT_ATMLOGICAL                    = 0x50
-       IFT_ATMRADIO                      = 0xbd
-       IFT_ATMSUBINTERFACE               = 0x86
-       IFT_ATMVCIENDPT                   = 0xc2
-       IFT_ATMVIRTUAL                    = 0x95
-       IFT_BGPPOLICYACCOUNTING           = 0xa2
-       IFT_BSC                           = 0x53
-       IFT_CCTEMUL                       = 0x3d
-       IFT_CEPT                          = 0x13
-       IFT_CES                           = 0x85
-       IFT_CHANNEL                       = 0x46
-       IFT_CNR                           = 0x55
-       IFT_COFFEE                        = 0x84
-       IFT_COMPOSITELINK                 = 0x9b
-       IFT_DCN                           = 0x8d
-       IFT_DIGITALPOWERLINE              = 0x8a
-       IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-       IFT_DLSW                          = 0x4a
-       IFT_DOCSCABLEDOWNSTREAM           = 0x80
-       IFT_DOCSCABLEMACLAYER             = 0x7f
-       IFT_DOCSCABLEUPSTREAM             = 0x81
-       IFT_DS0                           = 0x51
-       IFT_DS0BUNDLE                     = 0x52
-       IFT_DS1FDL                        = 0xaa
-       IFT_DS3                           = 0x1e
-       IFT_DTM                           = 0x8c
-       IFT_DVBASILN                      = 0xac
-       IFT_DVBASIOUT                     = 0xad
-       IFT_DVBRCCDOWNSTREAM              = 0x93
-       IFT_DVBRCCMACLAYER                = 0x92
-       IFT_DVBRCCUPSTREAM                = 0x94
-       IFT_ENC                           = 0xf4
-       IFT_EON                           = 0x19
-       IFT_EPLRS                         = 0x57
-       IFT_ESCON                         = 0x49
-       IFT_ETHER                         = 0x6
-       IFT_FAITH                         = 0xf2
-       IFT_FAST                          = 0x7d
-       IFT_FASTETHER                     = 0x3e
-       IFT_FASTETHERFX                   = 0x45
-       IFT_FDDI                          = 0xf
-       IFT_FIBRECHANNEL                  = 0x38
-       IFT_FRAMERELAYINTERCONNECT        = 0x3a
-       IFT_FRAMERELAYMPI                 = 0x5c
-       IFT_FRDLCIENDPT                   = 0xc1
-       IFT_FRELAY                        = 0x20
-       IFT_FRELAYDCE                     = 0x2c
-       IFT_FRF16MFRBUNDLE                = 0xa3
-       IFT_FRFORWARD                     = 0x9e
-       IFT_G703AT2MB                     = 0x43
-       IFT_G703AT64K                     = 0x42
-       IFT_GIF                           = 0xf0
-       IFT_GIGABITETHERNET               = 0x75
-       IFT_GR303IDT                      = 0xb2
-       IFT_GR303RDT                      = 0xb1
-       IFT_H323GATEKEEPER                = 0xa4
-       IFT_H323PROXY                     = 0xa5
-       IFT_HDH1822                       = 0x3
-       IFT_HDLC                          = 0x76
-       IFT_HDSL2                         = 0xa8
-       IFT_HIPERLAN2                     = 0xb7
-       IFT_HIPPI                         = 0x2f
-       IFT_HIPPIINTERFACE                = 0x39
-       IFT_HOSTPAD                       = 0x5a
-       IFT_HSSI                          = 0x2e
-       IFT_HY                            = 0xe
-       IFT_IBM370PARCHAN                 = 0x48
-       IFT_IDSL                          = 0x9a
-       IFT_IEEE80211                     = 0x47
-       IFT_IEEE80212                     = 0x37
-       IFT_IEEE8023ADLAG                 = 0xa1
-       IFT_IFGSN                         = 0x91
-       IFT_IMT                           = 0xbe
-       IFT_INTERLEAVE                    = 0x7c
-       IFT_IP                            = 0x7e
-       IFT_IPFORWARD                     = 0x8e
-       IFT_IPOVERATM                     = 0x72
-       IFT_IPOVERCDLC                    = 0x6d
-       IFT_IPOVERCLAW                    = 0x6e
-       IFT_IPSWITCH                      = 0x4e
-       IFT_IPXIP                         = 0xf9
-       IFT_ISDN                          = 0x3f
-       IFT_ISDNBASIC                     = 0x14
-       IFT_ISDNPRIMARY                   = 0x15
-       IFT_ISDNS                         = 0x4b
-       IFT_ISDNU                         = 0x4c
-       IFT_ISO88022LLC                   = 0x29
-       IFT_ISO88023                      = 0x7
-       IFT_ISO88024                      = 0x8
-       IFT_ISO88025                      = 0x9
-       IFT_ISO88025CRFPINT               = 0x62
-       IFT_ISO88025DTR                   = 0x56
-       IFT_ISO88025FIBER                 = 0x73
-       IFT_ISO88026                      = 0xa
-       IFT_ISUP                          = 0xb3
-       IFT_L3IPXVLAN                     = 0x89
-       IFT_LAPB                          = 0x10
-       IFT_LAPD                          = 0x4d
-       IFT_LAPF                          = 0x77
-       IFT_LOCALTALK                     = 0x2a
-       IFT_LOOP                          = 0x18
-       IFT_MEDIAMAILOVERIP               = 0x8b
-       IFT_MFSIGLINK                     = 0xa7
-       IFT_MIOX25                        = 0x26
-       IFT_MODEM                         = 0x30
-       IFT_MPC                           = 0x71
-       IFT_MPLS                          = 0xa6
-       IFT_MPLSTUNNEL                    = 0x96
-       IFT_MSDSL                         = 0x8f
-       IFT_MVL                           = 0xbf
-       IFT_MYRINET                       = 0x63
-       IFT_NFAS                          = 0xaf
-       IFT_NSIP                          = 0x1b
-       IFT_OPTICALCHANNEL                = 0xc3
-       IFT_OPTICALTRANSPORT              = 0xc4
-       IFT_OTHER                         = 0x1
-       IFT_P10                           = 0xc
-       IFT_P80                           = 0xd
-       IFT_PARA                          = 0x22
-       IFT_PFLOG                         = 0xf6
-       IFT_PFSYNC                        = 0xf7
-       IFT_PLC                           = 0xae
-       IFT_POS                           = 0xab
-       IFT_PPPMULTILINKBUNDLE            = 0x6c
-       IFT_PROPBWAP2MP                   = 0xb8
-       IFT_PROPCNLS                      = 0x59
-       IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-       IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-       IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-       IFT_PROPMUX                       = 0x36
-       IFT_PROPWIRELESSP2P               = 0x9d
-       IFT_PTPSERIAL                     = 0x16
-       IFT_PVC                           = 0xf1
-       IFT_QLLC                          = 0x44
-       IFT_RADIOMAC                      = 0xbc
-       IFT_RADSL                         = 0x5f
-       IFT_REACHDSL                      = 0xc0
-       IFT_RFC1483                       = 0x9f
-       IFT_RS232                         = 0x21
-       IFT_RSRB                          = 0x4f
-       IFT_SDLC                          = 0x11
-       IFT_SDSL                          = 0x60
-       IFT_SHDSL                         = 0xa9
-       IFT_SIP                           = 0x1f
-       IFT_SLIP                          = 0x1c
-       IFT_SMDSDXI                       = 0x2b
-       IFT_SMDSICIP                      = 0x34
-       IFT_SONET                         = 0x27
-       IFT_SONETOVERHEADCHANNEL          = 0xb9
-       IFT_SONETPATH                     = 0x32
-       IFT_SONETVT                       = 0x33
-       IFT_SRP                           = 0x97
-       IFT_SS7SIGLINK                    = 0x9c
-       IFT_STACKTOSTACK                  = 0x6f
-       IFT_STARLAN                       = 0xb
-       IFT_STF                           = 0xd7
-       IFT_T1                            = 0x12
-       IFT_TDLC                          = 0x74
-       IFT_TERMPAD                       = 0x5b
-       IFT_TR008                         = 0xb0
-       IFT_TRANSPHDLC                    = 0x7b
-       IFT_TUNNEL                        = 0x83
-       IFT_ULTRA                         = 0x1d
-       IFT_USB                           = 0xa0
-       IFT_V11                           = 0x40
-       IFT_V35                           = 0x2d
-       IFT_V36                           = 0x41
-       IFT_V37                           = 0x78
-       IFT_VDSL                          = 0x61
-       IFT_VIRTUALIPADDRESS              = 0x70
-       IFT_VOICEEM                       = 0x64
-       IFT_VOICEENCAP                    = 0x67
-       IFT_VOICEFXO                      = 0x65
-       IFT_VOICEFXS                      = 0x66
-       IFT_VOICEOVERATM                  = 0x98
-       IFT_VOICEOVERFRAMERELAY           = 0x99
-       IFT_VOICEOVERIP                   = 0x68
-       IFT_X213                          = 0x5d
-       IFT_X25                           = 0x5
-       IFT_X25DDN                        = 0x4
-       IFT_X25HUNTGROUP                  = 0x7a
-       IFT_X25MLP                        = 0x79
-       IFT_X25PLE                        = 0x28
-       IFT_XETHER                        = 0x1a
-       IPPROTO_MAXID                     = 0x34
-       IPV6_FAITH                        = 0x1d
-       IPV6_MIN_MEMBERSHIPS              = 0x1f
-       IP_FAITH                          = 0x16
-       IP_MAX_SOURCE_FILTER              = 0x400
-       IP_MIN_MEMBERSHIPS                = 0x1f
-       MAP_NORESERVE                     = 0x40
-       MAP_RENAME                        = 0x20
-       NET_RT_MAXID                      = 0x6
-       RTF_PRCLONING                     = 0x10000
-       RTM_OLDADD                        = 0x9
-       RTM_OLDDEL                        = 0xa
-       RT_CACHING_CONTEXT                = 0x1
-       RT_NORTREF                        = 0x2
-       SIOCADDRT                         = 0x8040720a
-       SIOCALIFADDR                      = 0x8118691b
-       SIOCDELRT                         = 0x8040720b
-       SIOCDLIFADDR                      = 0x8118691d
-       SIOCGLIFADDR                      = 0xc118691c
-       SIOCGLIFPHYADDR                   = 0xc118694b
-       SIOCSLIFPHYADDR                   = 0x8118694a
-)
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go b/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
deleted file mode 100644 (file)
index 856dca3..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2017 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.
-
-package unix
-
-const (
-       IFT_1822                          = 0x2
-       IFT_A12MPPSWITCH                  = 0x82
-       IFT_AAL2                          = 0xbb
-       IFT_AAL5                          = 0x31
-       IFT_ADSL                          = 0x5e
-       IFT_AFLANE8023                    = 0x3b
-       IFT_AFLANE8025                    = 0x3c
-       IFT_ARAP                          = 0x58
-       IFT_ARCNET                        = 0x23
-       IFT_ARCNETPLUS                    = 0x24
-       IFT_ASYNC                         = 0x54
-       IFT_ATM                           = 0x25
-       IFT_ATMDXI                        = 0x69
-       IFT_ATMFUNI                       = 0x6a
-       IFT_ATMIMA                        = 0x6b
-       IFT_ATMLOGICAL                    = 0x50
-       IFT_ATMRADIO                      = 0xbd
-       IFT_ATMSUBINTERFACE               = 0x86
-       IFT_ATMVCIENDPT                   = 0xc2
-       IFT_ATMVIRTUAL                    = 0x95
-       IFT_BGPPOLICYACCOUNTING           = 0xa2
-       IFT_BSC                           = 0x53
-       IFT_CCTEMUL                       = 0x3d
-       IFT_CEPT                          = 0x13
-       IFT_CES                           = 0x85
-       IFT_CHANNEL                       = 0x46
-       IFT_CNR                           = 0x55
-       IFT_COFFEE                        = 0x84
-       IFT_COMPOSITELINK                 = 0x9b
-       IFT_DCN                           = 0x8d
-       IFT_DIGITALPOWERLINE              = 0x8a
-       IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-       IFT_DLSW                          = 0x4a
-       IFT_DOCSCABLEDOWNSTREAM           = 0x80
-       IFT_DOCSCABLEMACLAYER             = 0x7f
-       IFT_DOCSCABLEUPSTREAM             = 0x81
-       IFT_DS0                           = 0x51
-       IFT_DS0BUNDLE                     = 0x52
-       IFT_DS1FDL                        = 0xaa
-       IFT_DS3                           = 0x1e
-       IFT_DTM                           = 0x8c
-       IFT_DVBASILN                      = 0xac
-       IFT_DVBASIOUT                     = 0xad
-       IFT_DVBRCCDOWNSTREAM              = 0x93
-       IFT_DVBRCCMACLAYER                = 0x92
-       IFT_DVBRCCUPSTREAM                = 0x94
-       IFT_ENC                           = 0xf4
-       IFT_EON                           = 0x19
-       IFT_EPLRS                         = 0x57
-       IFT_ESCON                         = 0x49
-       IFT_ETHER                         = 0x6
-       IFT_FAST                          = 0x7d
-       IFT_FASTETHER                     = 0x3e
-       IFT_FASTETHERFX                   = 0x45
-       IFT_FDDI                          = 0xf
-       IFT_FIBRECHANNEL                  = 0x38
-       IFT_FRAMERELAYINTERCONNECT        = 0x3a
-       IFT_FRAMERELAYMPI                 = 0x5c
-       IFT_FRDLCIENDPT                   = 0xc1
-       IFT_FRELAY                        = 0x20
-       IFT_FRELAYDCE                     = 0x2c
-       IFT_FRF16MFRBUNDLE                = 0xa3
-       IFT_FRFORWARD                     = 0x9e
-       IFT_G703AT2MB                     = 0x43
-       IFT_G703AT64K                     = 0x42
-       IFT_GIF                           = 0xf0
-       IFT_GIGABITETHERNET               = 0x75
-       IFT_GR303IDT                      = 0xb2
-       IFT_GR303RDT                      = 0xb1
-       IFT_H323GATEKEEPER                = 0xa4
-       IFT_H323PROXY                     = 0xa5
-       IFT_HDH1822                       = 0x3
-       IFT_HDLC                          = 0x76
-       IFT_HDSL2                         = 0xa8
-       IFT_HIPERLAN2                     = 0xb7
-       IFT_HIPPI                         = 0x2f
-       IFT_HIPPIINTERFACE                = 0x39
-       IFT_HOSTPAD                       = 0x5a
-       IFT_HSSI                          = 0x2e
-       IFT_HY                            = 0xe
-       IFT_IBM370PARCHAN                 = 0x48
-       IFT_IDSL                          = 0x9a
-       IFT_IEEE80211                     = 0x47
-       IFT_IEEE80212                     = 0x37
-       IFT_IEEE8023ADLAG                 = 0xa1
-       IFT_IFGSN                         = 0x91
-       IFT_IMT                           = 0xbe
-       IFT_INTERLEAVE                    = 0x7c
-       IFT_IP                            = 0x7e
-       IFT_IPFORWARD                     = 0x8e
-       IFT_IPOVERATM                     = 0x72
-       IFT_IPOVERCDLC                    = 0x6d
-       IFT_IPOVERCLAW                    = 0x6e
-       IFT_IPSWITCH                      = 0x4e
-       IFT_ISDN                          = 0x3f
-       IFT_ISDNBASIC                     = 0x14
-       IFT_ISDNPRIMARY                   = 0x15
-       IFT_ISDNS                         = 0x4b
-       IFT_ISDNU                         = 0x4c
-       IFT_ISO88022LLC                   = 0x29
-       IFT_ISO88023                      = 0x7
-       IFT_ISO88024                      = 0x8
-       IFT_ISO88025                      = 0x9
-       IFT_ISO88025CRFPINT               = 0x62
-       IFT_ISO88025DTR                   = 0x56
-       IFT_ISO88025FIBER                 = 0x73
-       IFT_ISO88026                      = 0xa
-       IFT_ISUP                          = 0xb3
-       IFT_L3IPXVLAN                     = 0x89
-       IFT_LAPB                          = 0x10
-       IFT_LAPD                          = 0x4d
-       IFT_LAPF                          = 0x77
-       IFT_LOCALTALK                     = 0x2a
-       IFT_LOOP                          = 0x18
-       IFT_MEDIAMAILOVERIP               = 0x8b
-       IFT_MFSIGLINK                     = 0xa7
-       IFT_MIOX25                        = 0x26
-       IFT_MODEM                         = 0x30
-       IFT_MPC                           = 0x71
-       IFT_MPLS                          = 0xa6
-       IFT_MPLSTUNNEL                    = 0x96
-       IFT_MSDSL                         = 0x8f
-       IFT_MVL                           = 0xbf
-       IFT_MYRINET                       = 0x63
-       IFT_NFAS                          = 0xaf
-       IFT_NSIP                          = 0x1b
-       IFT_OPTICALCHANNEL                = 0xc3
-       IFT_OPTICALTRANSPORT              = 0xc4
-       IFT_OTHER                         = 0x1
-       IFT_P10                           = 0xc
-       IFT_P80                           = 0xd
-       IFT_PARA                          = 0x22
-       IFT_PFLOG                         = 0xf6
-       IFT_PFSYNC                        = 0xf7
-       IFT_PLC                           = 0xae
-       IFT_POS                           = 0xab
-       IFT_PPPMULTILINKBUNDLE            = 0x6c
-       IFT_PROPBWAP2MP                   = 0xb8
-       IFT_PROPCNLS                      = 0x59
-       IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-       IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-       IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-       IFT_PROPMUX                       = 0x36
-       IFT_PROPWIRELESSP2P               = 0x9d
-       IFT_PTPSERIAL                     = 0x16
-       IFT_PVC                           = 0xf1
-       IFT_QLLC                          = 0x44
-       IFT_RADIOMAC                      = 0xbc
-       IFT_RADSL                         = 0x5f
-       IFT_REACHDSL                      = 0xc0
-       IFT_RFC1483                       = 0x9f
-       IFT_RS232                         = 0x21
-       IFT_RSRB                          = 0x4f
-       IFT_SDLC                          = 0x11
-       IFT_SDSL                          = 0x60
-       IFT_SHDSL                         = 0xa9
-       IFT_SIP                           = 0x1f
-       IFT_SLIP                          = 0x1c
-       IFT_SMDSDXI                       = 0x2b
-       IFT_SMDSICIP                      = 0x34
-       IFT_SONET                         = 0x27
-       IFT_SONETOVERHEADCHANNEL          = 0xb9
-       IFT_SONETPATH                     = 0x32
-       IFT_SONETVT                       = 0x33
-       IFT_SRP                           = 0x97
-       IFT_SS7SIGLINK                    = 0x9c
-       IFT_STACKTOSTACK                  = 0x6f
-       IFT_STARLAN                       = 0xb
-       IFT_STF                           = 0xd7
-       IFT_T1                            = 0x12
-       IFT_TDLC                          = 0x74
-       IFT_TERMPAD                       = 0x5b
-       IFT_TR008                         = 0xb0
-       IFT_TRANSPHDLC                    = 0x7b
-       IFT_TUNNEL                        = 0x83
-       IFT_ULTRA                         = 0x1d
-       IFT_USB                           = 0xa0
-       IFT_V11                           = 0x40
-       IFT_V35                           = 0x2d
-       IFT_V36                           = 0x41
-       IFT_V37                           = 0x78
-       IFT_VDSL                          = 0x61
-       IFT_VIRTUALIPADDRESS              = 0x70
-       IFT_VOICEEM                       = 0x64
-       IFT_VOICEENCAP                    = 0x67
-       IFT_VOICEFXO                      = 0x65
-       IFT_VOICEFXS                      = 0x66
-       IFT_VOICEOVERATM                  = 0x98
-       IFT_VOICEOVERFRAMERELAY           = 0x99
-       IFT_VOICEOVERIP                   = 0x68
-       IFT_X213                          = 0x5d
-       IFT_X25                           = 0x5
-       IFT_X25DDN                        = 0x4
-       IFT_X25HUNTGROUP                  = 0x7a
-       IFT_X25MLP                        = 0x79
-       IFT_X25PLE                        = 0x28
-       IFT_XETHER                        = 0x1a
-
-       // missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
-       IFF_SMART       = 0x20
-       IFT_FAITH       = 0xf2
-       IFT_IPXIP       = 0xf9
-       IPPROTO_MAXID   = 0x34
-       IPV6_FAITH      = 0x1d
-       IP_FAITH        = 0x16
-       MAP_NORESERVE   = 0x40
-       MAP_RENAME      = 0x20
-       NET_RT_MAXID    = 0x6
-       RTF_PRCLONING   = 0x10000
-       RTM_OLDADD      = 0x9
-       RTM_OLDDEL      = 0xa
-       SIOCADDRT       = 0x8030720a
-       SIOCALIFADDR    = 0x8118691b
-       SIOCDELRT       = 0x8030720b
-       SIOCDLIFADDR    = 0x8118691d
-       SIOCGLIFADDR    = 0xc118691c
-       SIOCGLIFPHYADDR = 0xc118694b
-       SIOCSLIFPHYADDR = 0x8118694a
-)
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go b/src/cmd/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
deleted file mode 100644 (file)
index 946dcf3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2020 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.
-
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
-// them here for backwards compatibility.
-
-package unix
-
-const (
-       DLT_HHDLC            = 0x79
-       IPV6_MIN_MEMBERSHIPS = 0x1f
-       IP_MAX_SOURCE_FILTER = 0x400
-       IP_MIN_MEMBERSHIPS   = 0x1f
-       RT_CACHING_CONTEXT   = 0x1
-       RT_NORTREF           = 0x2
-)
index ee73623489b07f54e90c2f5622f89d0c97448a49..dcef4de6f18634ea2ae06ccea042db2655913fd5 100644 (file)
@@ -89,25 +89,30 @@ dragonfly_amd64)
 freebsd_386)
        mkerrors="$mkerrors -m32"
        mksyscall="go run mksyscall.go -l32"
-       mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
+       mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs"
        ;;
 freebsd_amd64)
        mkerrors="$mkerrors -m64"
-       mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
+       mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs"
        ;;
 freebsd_arm)
        mkerrors="$mkerrors"
        mksyscall="go run mksyscall.go -l32 -arm"
-       mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
+       mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
        # Let the type of C char be signed for making the bare syscall
        # API consistent across platforms.
        mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
        ;;
 freebsd_arm64)
        mkerrors="$mkerrors -m64"
-       mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
+       mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
+       mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+       ;;
+freebsd_riscv64)
+       mkerrors="$mkerrors -m64"
+       mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
        ;;
 netbsd_386)
index d888fb770364d86e83eafa81510ee2f185aa161c..2ab44aa659175b206e5500398a104ffe91fff4bc 100644 (file)
@@ -128,6 +128,7 @@ includes_FreeBSD='
 #include <sys/mount.h>
 #include <sys/wait.h>
 #include <sys/ioctl.h>
+#include <sys/ptrace.h>
 #include <net/bpf.h>
 #include <net/if.h>
 #include <net/if_types.h>
@@ -202,6 +203,7 @@ struct ltchars {
 #include <sys/timerfd.h>
 #include <sys/uio.h>
 #include <sys/xattr.h>
+#include <linux/audit.h>
 #include <linux/bpf.h>
 #include <linux/can.h>
 #include <linux/can/error.h>
@@ -295,6 +297,10 @@ struct ltchars {
 #define SOL_NETLINK    270
 #endif
 
+#ifndef SOL_SMC
+#define SOL_SMC 286
+#endif
+
 #ifdef SOL_BLUETOOTH
 // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
 // but it is already in bluetooth_linux.go
@@ -529,7 +535,7 @@ ccflags="$@"
                $2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
                $2 ~ /^NS_GET_/ ||
                $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
-               $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
+               $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
                $2 ~ /^KEXEC_/ ||
                $2 ~ /^LINUX_REBOOT_CMD_/ ||
                $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
@@ -553,6 +559,7 @@ ccflags="$@"
                $2 ~ /^CLONE_[A-Z_]+/ ||
                $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
                $2 ~ /^(BPF|DLT)_/ ||
+               $2 ~ /^AUDIT_/ ||
                $2 ~ /^(CLOCK|TIMER)_/ ||
                $2 ~ /^CAN_/ ||
                $2 ~ /^CAP_/ ||
@@ -575,7 +582,6 @@ ccflags="$@"
                $2 ~ /^SEEK_/ ||
                $2 ~ /^SPLICE_/ ||
                $2 ~ /^SYNC_FILE_RANGE_/ ||
-               $2 !~ /^AUDIT_RECORD_MAGIC/ &&
                $2 !~ /IOC_MAGIC/ &&
                $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
                $2 ~ /^(VM|VMADDR)_/ ||
index ad22c33db3db302da5d805efbe2e125d0f5a2736..2db1b51e99f04098055f018b1ead48b497cef57e 100644 (file)
@@ -217,14 +217,63 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
        return
 }
 
-func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
-       // Recvmsg not implemented on AIX
-       return -1, -1, -1, ENOSYS
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
+       var msg Msghdr
+       msg.Name = (*byte)(unsafe.Pointer(rsa))
+       msg.Namelen = uint32(SizeofSockaddrAny)
+       var dummy byte
+       if len(oob) > 0 {
+               // receive at least one normal byte
+               if emptyIovecs(iov) {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
+               }
+               msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+               msg.SetControllen(len(oob))
+       }
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
+       if n, err = recvmsg(fd, &msg, flags); n == -1 {
+               return
+       }
+       oobn = int(msg.Controllen)
+       recvflags = int(msg.Flags)
+       return
 }
 
-func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
-       // SendmsgN not implemented on AIX
-       return -1, ENOSYS
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
+       var msg Msghdr
+       msg.Name = (*byte)(unsafe.Pointer(ptr))
+       msg.Namelen = uint32(salen)
+       var dummy byte
+       var empty bool
+       if len(oob) > 0 {
+               // send at least one normal byte
+               empty = emptyIovecs(iov)
+               if empty {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
+               }
+               msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+               msg.SetControllen(len(oob))
+       }
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
+       if n, err = sendmsg(fd, &msg, flags); err != nil {
+               return 0, err
+       }
+       if len(oob) > 0 && empty {
+               n = 0
+       }
+       return n, nil
 }
 
 func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
index 9c87c5f07f8c885378ca306cc7bf28c9ea923964..eda42671f195432fc99bd91b5cc200fc621d4c65 100644 (file)
@@ -325,27 +325,26 @@ func GetsockoptString(fd, level, opt int) (string, error) {
 //sys  sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
 //sys  recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
 
-func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(unsafe.Pointer(rsa))
        msg.Namelen = uint32(SizeofSockaddrAny)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-               iov.SetLen(len(p))
-       }
        var dummy byte
        if len(oob) > 0 {
                // receive at least one normal byte
-               if len(p) == 0 {
-                       iov.Base = &dummy
-                       iov.SetLen(1)
+               if emptyIovecs(iov) {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
                }
                msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
                msg.SetControllen(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = recvmsg(fd, &msg, flags); err != nil {
                return
        }
@@ -356,31 +355,32 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
 
 //sys  sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 
-func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(unsafe.Pointer(ptr))
        msg.Namelen = uint32(salen)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-               iov.SetLen(len(p))
-       }
        var dummy byte
+       var empty bool
        if len(oob) > 0 {
                // send at least one normal byte
-               if len(p) == 0 {
-                       iov.Base = &dummy
-                       iov.SetLen(1)
+               empty = emptyIovecs(iov)
+               if empty {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
                }
                msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
                msg.SetControllen(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = sendmsg(fd, &msg, flags); err != nil {
                return 0, err
        }
-       if len(oob) > 0 && len(p) == 0 {
+       if len(oob) > 0 && empty {
                n = 0
        }
        return n, nil
index e5448cc93caa540b4cf603d4e85d6f7f8923e8d2..4f87f16ea7cfbe3c8127ac14016bb3216cd4baed 100644 (file)
@@ -393,6 +393,13 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
        return x, err
 }
 
+func GetsockoptTCPConnectionInfo(fd, level, opt int) (*TCPConnectionInfo, error) {
+       var value TCPConnectionInfo
+       vallen := _Socklen(SizeofTCPConnectionInfo)
+       err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+       return &value, err
+}
+
 func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
        mib, err := sysctlmib(name, args...)
        if err != nil {
index 6f6c510f4130d046dd6da063e581168ea4bd8ae6..de7c23e0648ada4c712c3a791e66be90196ada7b 100644 (file)
@@ -17,25 +17,12 @@ import (
        "unsafe"
 )
 
-const (
-       SYS_FSTAT_FREEBSD12         = 551 // { int fstat(int fd, _Out_ struct stat *sb); }
-       SYS_FSTATAT_FREEBSD12       = 552 // { int fstatat(int fd, _In_z_ char *path, \
-       SYS_GETDIRENTRIES_FREEBSD12 = 554 // { ssize_t getdirentries(int fd, \
-       SYS_STATFS_FREEBSD12        = 555 // { int statfs(_In_z_ char *path, \
-       SYS_FSTATFS_FREEBSD12       = 556 // { int fstatfs(int fd, \
-       SYS_GETFSSTAT_FREEBSD12     = 557 // { int getfsstat( \
-       SYS_MKNODAT_FREEBSD12       = 559 // { int mknodat(int fd, _In_z_ char *path, \
-)
-
 // See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.
 var (
        osreldateOnce sync.Once
        osreldate     uint32
 )
 
-// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
-const _ino64First = 1200031
-
 func supportsABI(ver uint32) bool {
        osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
        return osreldate >= ver
@@ -159,38 +146,18 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
 
 func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
        var (
-               _p0          unsafe.Pointer
-               bufsize      uintptr
-               oldBuf       []statfs_freebsd11_t
-               needsConvert bool
+               _p0     unsafe.Pointer
+               bufsize uintptr
        )
-
        if len(buf) > 0 {
-               if supportsABI(_ino64First) {
-                       _p0 = unsafe.Pointer(&buf[0])
-                       bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
-               } else {
-                       n := len(buf)
-                       oldBuf = make([]statfs_freebsd11_t, n)
-                       _p0 = unsafe.Pointer(&oldBuf[0])
-                       bufsize = unsafe.Sizeof(statfs_freebsd11_t{}) * uintptr(n)
-                       needsConvert = true
-               }
+               _p0 = unsafe.Pointer(&buf[0])
+               bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
        }
-       var sysno uintptr = SYS_GETFSSTAT
-       if supportsABI(_ino64First) {
-               sysno = SYS_GETFSSTAT_FREEBSD12
-       }
-       r0, _, e1 := Syscall(sysno, uintptr(_p0), bufsize, uintptr(flags))
+       r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
        n = int(r0)
        if e1 != 0 {
                err = e1
        }
-       if e1 == 0 && needsConvert {
-               for i := range oldBuf {
-                       buf[i].convertFrom(&oldBuf[i])
-               }
-       }
        return
 }
 
@@ -245,87 +212,11 @@ func Uname(uname *Utsname) error {
 }
 
 func Stat(path string, st *Stat_t) (err error) {
-       var oldStat stat_freebsd11_t
-       if supportsABI(_ino64First) {
-               return fstatat_freebsd12(AT_FDCWD, path, st, 0)
-       }
-       err = stat(path, &oldStat)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStat)
-       return nil
+       return Fstatat(AT_FDCWD, path, st, 0)
 }
 
 func Lstat(path string, st *Stat_t) (err error) {
-       var oldStat stat_freebsd11_t
-       if supportsABI(_ino64First) {
-               return fstatat_freebsd12(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
-       }
-       err = lstat(path, &oldStat)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStat)
-       return nil
-}
-
-func Fstat(fd int, st *Stat_t) (err error) {
-       var oldStat stat_freebsd11_t
-       if supportsABI(_ino64First) {
-               return fstat_freebsd12(fd, st)
-       }
-       err = fstat(fd, &oldStat)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStat)
-       return nil
-}
-
-func Fstatat(fd int, path string, st *Stat_t, flags int) (err error) {
-       var oldStat stat_freebsd11_t
-       if supportsABI(_ino64First) {
-               return fstatat_freebsd12(fd, path, st, flags)
-       }
-       err = fstatat(fd, path, &oldStat, flags)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStat)
-       return nil
-}
-
-func Statfs(path string, st *Statfs_t) (err error) {
-       var oldStatfs statfs_freebsd11_t
-       if supportsABI(_ino64First) {
-               return statfs_freebsd12(path, st)
-       }
-       err = statfs(path, &oldStatfs)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStatfs)
-       return nil
-}
-
-func Fstatfs(fd int, st *Statfs_t) (err error) {
-       var oldStatfs statfs_freebsd11_t
-       if supportsABI(_ino64First) {
-               return fstatfs_freebsd12(fd, st)
-       }
-       err = fstatfs(fd, &oldStatfs)
-       if err != nil {
-               return err
-       }
-
-       st.convertFrom(&oldStatfs)
-       return nil
+       return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
 }
 
 func Getdents(fd int, buf []byte) (n int, err error) {
@@ -333,162 +224,25 @@ func Getdents(fd int, buf []byte) (n int, err error) {
 }
 
 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-       if supportsABI(_ino64First) {
-               if basep == nil || unsafe.Sizeof(*basep) == 8 {
-                       return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
-               }
-               // The freebsd12 syscall needs a 64-bit base. On 32-bit machines
-               // we can't just use the basep passed in. See #32498.
-               var base uint64 = uint64(*basep)
-               n, err = getdirentries_freebsd12(fd, buf, &base)
-               *basep = uintptr(base)
-               if base>>32 != 0 {
-                       // We can't stuff the base back into a uintptr, so any
-                       // future calls would be suspect. Generate an error.
-                       // EIO is allowed by getdirentries.
-                       err = EIO
-               }
-               return
-       }
-
-       // The old syscall entries are smaller than the new. Use 1/4 of the original
-       // buffer size rounded up to DIRBLKSIZ (see /usr/src/lib/libc/sys/getdirentries.c).
-       oldBufLen := roundup(len(buf)/4, _dirblksiz)
-       oldBuf := make([]byte, oldBufLen)
-       n, err = getdirentries(fd, oldBuf, basep)
-       if err == nil && n > 0 {
-               n = convertFromDirents11(buf, oldBuf[:n])
+       if basep == nil || unsafe.Sizeof(*basep) == 8 {
+               return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
+       }
+       // The syscall needs a 64-bit base. On 32-bit machines
+       // we can't just use the basep passed in. See #32498.
+       var base uint64 = uint64(*basep)
+       n, err = getdirentries(fd, buf, &base)
+       *basep = uintptr(base)
+       if base>>32 != 0 {
+               // We can't stuff the base back into a uintptr, so any
+               // future calls would be suspect. Generate an error.
+               // EIO is allowed by getdirentries.
+               err = EIO
        }
        return
 }
 
 func Mknod(path string, mode uint32, dev uint64) (err error) {
-       var oldDev int
-       if supportsABI(_ino64First) {
-               return mknodat_freebsd12(AT_FDCWD, path, mode, dev)
-       }
-       oldDev = int(dev)
-       return mknod(path, mode, oldDev)
-}
-
-func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
-       var oldDev int
-       if supportsABI(_ino64First) {
-               return mknodat_freebsd12(fd, path, mode, dev)
-       }
-       oldDev = int(dev)
-       return mknodat(fd, path, mode, oldDev)
-}
-
-// round x to the nearest multiple of y, larger or equal to x.
-//
-// from /usr/include/sys/param.h Macros for counting and rounding.
-// #define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
-func roundup(x, y int) int {
-       return ((x + y - 1) / y) * y
-}
-
-func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
-       *s = Stat_t{
-               Dev:     uint64(old.Dev),
-               Ino:     uint64(old.Ino),
-               Nlink:   uint64(old.Nlink),
-               Mode:    old.Mode,
-               Uid:     old.Uid,
-               Gid:     old.Gid,
-               Rdev:    uint64(old.Rdev),
-               Atim:    old.Atim,
-               Mtim:    old.Mtim,
-               Ctim:    old.Ctim,
-               Btim:    old.Btim,
-               Size:    old.Size,
-               Blocks:  old.Blocks,
-               Blksize: old.Blksize,
-               Flags:   old.Flags,
-               Gen:     uint64(old.Gen),
-       }
-}
-
-func (s *Statfs_t) convertFrom(old *statfs_freebsd11_t) {
-       *s = Statfs_t{
-               Version:     _statfsVersion,
-               Type:        old.Type,
-               Flags:       old.Flags,
-               Bsize:       old.Bsize,
-               Iosize:      old.Iosize,
-               Blocks:      old.Blocks,
-               Bfree:       old.Bfree,
-               Bavail:      old.Bavail,
-               Files:       old.Files,
-               Ffree:       old.Ffree,
-               Syncwrites:  old.Syncwrites,
-               Asyncwrites: old.Asyncwrites,
-               Syncreads:   old.Syncreads,
-               Asyncreads:  old.Asyncreads,
-               // Spare
-               Namemax: old.Namemax,
-               Owner:   old.Owner,
-               Fsid:    old.Fsid,
-               // Charspare
-               // Fstypename
-               // Mntfromname
-               // Mntonname
-       }
-
-       sl := old.Fstypename[:]
-       n := clen(*(*[]byte)(unsafe.Pointer(&sl)))
-       copy(s.Fstypename[:], old.Fstypename[:n])
-
-       sl = old.Mntfromname[:]
-       n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
-       copy(s.Mntfromname[:], old.Mntfromname[:n])
-
-       sl = old.Mntonname[:]
-       n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
-       copy(s.Mntonname[:], old.Mntonname[:n])
-}
-
-func convertFromDirents11(buf []byte, old []byte) int {
-       const (
-               fixedSize    = int(unsafe.Offsetof(Dirent{}.Name))
-               oldFixedSize = int(unsafe.Offsetof(dirent_freebsd11{}.Name))
-       )
-
-       dstPos := 0
-       srcPos := 0
-       for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
-               var dstDirent Dirent
-               var srcDirent dirent_freebsd11
-
-               // If multiple direntries are written, sometimes when we reach the final one,
-               // we may have cap of old less than size of dirent_freebsd11.
-               copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
-
-               reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
-               if dstPos+reclen > len(buf) {
-                       break
-               }
-
-               dstDirent.Fileno = uint64(srcDirent.Fileno)
-               dstDirent.Off = 0
-               dstDirent.Reclen = uint16(reclen)
-               dstDirent.Type = srcDirent.Type
-               dstDirent.Pad0 = 0
-               dstDirent.Namlen = uint16(srcDirent.Namlen)
-               dstDirent.Pad1 = 0
-
-               copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
-               copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
-               padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
-               for i := range padding {
-                       padding[i] = 0
-               }
-
-               dstPos += int(dstDirent.Reclen)
-               srcPos += int(srcDirent.Reclen)
-       }
-
-       return dstPos
+       return Mknodat(AT_FDCWD, path, mode, dev)
 }
 
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
@@ -501,31 +255,31 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 //sys  ptrace(request int, pid int, addr uintptr, data int) (err error)
 
 func PtraceAttach(pid int) (err error) {
-       return ptrace(PTRACE_ATTACH, pid, 0, 0)
+       return ptrace(PT_ATTACH, pid, 0, 0)
 }
 
 func PtraceCont(pid int, signal int) (err error) {
-       return ptrace(PTRACE_CONT, pid, 1, signal)
+       return ptrace(PT_CONTINUE, pid, 1, signal)
 }
 
 func PtraceDetach(pid int) (err error) {
-       return ptrace(PTRACE_DETACH, pid, 1, 0)
+       return ptrace(PT_DETACH, pid, 1, 0)
 }
 
 func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
-       return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
+       return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
 }
 
 func PtraceGetRegs(pid int, regsout *Reg) (err error) {
-       return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
+       return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
 }
 
 func PtraceLwpEvents(pid int, enable int) (err error) {
-       return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
+       return ptrace(PT_LWP_EVENTS, pid, 0, enable)
 }
 
 func PtraceLwpInfo(pid int, info uintptr) (err error) {
-       return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
+       return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
 }
 
 func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
@@ -545,11 +299,11 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
 }
 
 func PtraceSetRegs(pid int, regs *Reg) (err error) {
-       return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
+       return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
 }
 
 func PtraceSingleStep(pid int) (err error) {
-       return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
+       return ptrace(PT_STEP, pid, 1, 0)
 }
 
 /*
@@ -591,16 +345,12 @@ func PtraceSingleStep(pid int) (err error) {
 //sys  Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
 //sys  Flock(fd int, how int) (err error)
 //sys  Fpathconf(fd int, name int) (val int, err error)
-//sys  fstat(fd int, stat *stat_freebsd11_t) (err error)
-//sys  fstat_freebsd12(fd int, stat *Stat_t) (err error)
-//sys  fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
-//sys  fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys  fstatfs(fd int, stat *statfs_freebsd11_t) (err error)
-//sys  fstatfs_freebsd12(fd int, stat *Statfs_t) (err error)
+//sys  Fstat(fd int, stat *Stat_t) (err error)
+//sys  Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
+//sys  Fstatfs(fd int, stat *Statfs_t) (err error)
 //sys  Fsync(fd int) (err error)
 //sys  Ftruncate(fd int, length int64) (err error)
-//sys  getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys  getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
+//sys  getdirentries(fd int, buf []byte, basep *uint64) (n int, err error)
 //sys  Getdtablesize() (size int)
 //sysnb        Getegid() (egid int)
 //sysnb        Geteuid() (uid int)
@@ -622,13 +372,10 @@ func PtraceSingleStep(pid int) (err error) {
 //sys  Link(path string, link string) (err error)
 //sys  Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
 //sys  Listen(s int, backlog int) (err error)
-//sys  lstat(path string, stat *stat_freebsd11_t) (err error)
 //sys  Mkdir(path string, mode uint32) (err error)
 //sys  Mkdirat(dirfd int, path string, mode uint32) (err error)
 //sys  Mkfifo(path string, mode uint32) (err error)
-//sys  mknod(path string, mode uint32, dev int) (err error)
-//sys  mknodat(fd int, path string, mode uint32, dev int) (err error)
-//sys  mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
+//sys  Mknodat(fd int, path string, mode uint32, dev uint64) (err error)
 //sys  Nanosleep(time *Timespec, leftover *Timespec) (err error)
 //sys  Open(path string, mode int, perm uint32) (fd int, err error)
 //sys  Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
@@ -658,9 +405,7 @@ func PtraceSingleStep(pid int) (err error) {
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
 //sysnb        Setuid(uid int) (err error)
-//sys  stat(path string, stat *stat_freebsd11_t) (err error)
-//sys  statfs(path string, stat *statfs_freebsd11_t) (err error)
-//sys  statfs_freebsd12(path string, stat *Statfs_t) (err error)
+//sys  Statfs(path string, stat *Statfs_t) (err error)
 //sys  Symlink(path string, link string) (err error)
 //sys  Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
 //sys  Sync() (err error)
index 342fc32b1686a2d8d6cfe7e8958735e7c6aae30c..c3c4c698e0720914e30fed628cec8ea39434a6ac 100644 (file)
@@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
-       return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+       return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
 }
 
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
        ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
-       err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
        return int(ioDesc.Len), err
 }
index a32d5aa4aed44564ea32ac4395b7b4c750d7ca10..82be61a2f98b15362e96bdebf214509c3a751452 100644 (file)
@@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
-       return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+       return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
 }
 
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
        ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
-       err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
        return int(ioDesc.Len), err
 }
index 1e36d39abe0189642fa4aeb8824ed20528aff15b..cd58f1026c057c84f093e8fa1d65d5704c4089e6 100644 (file)
@@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
        ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
-       err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
        return int(ioDesc.Len), err
 }
index a09a1537bd6f3d9e0a3fa6211073866905f70762..d6f538f9e007703e8b871e17191727bd4125bbfa 100644 (file)
@@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
        ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
-       err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
        return int(ioDesc.Len), err
 }
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go b/src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
new file mode 100644 (file)
index 0000000..8ea6e96
--- /dev/null
@@ -0,0 +1,63 @@
+// Copyright 2022 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.
+
+//go:build riscv64 && freebsd
+// +build riscv64,freebsd
+
+package unix
+
+import (
+       "syscall"
+       "unsafe"
+)
+
+func setTimespec(sec, nsec int64) Timespec {
+       return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+       return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+       k.Ident = uint64(fd)
+       k.Filter = int16(mode)
+       k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+       iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+       msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+       msghdr.Iovlen = int32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+       cmsg.Len = uint32(length)
+}
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+       var writtenOut uint64 = 0
+       _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
+
+       written = int(writtenOut)
+
+       if e1 != 0 {
+               err = e1
+       }
+       return
+}
+
+func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+
+func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
+       ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       return int(ioDesc.Len), err
+}
index 8d5f294c425047719923573422cc5e4f6c383b98..e48244a9c9a54f711013f39837190956cfa9b435 100644 (file)
@@ -20,10 +20,9 @@ func bytes2iovec(bs [][]byte) []Iovec {
        for i, b := range bs {
                iovecs[i].SetLen(len(b))
                if len(b) > 0 {
-                       // somehow Iovec.Base on illumos is (*int8), not (*byte)
-                       iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
+                       iovecs[i].Base = &b[0]
                } else {
-                       iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
+                       iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))
                }
        }
        return iovecs
index c8d2032125179991b3988cb961514d0af7cd4dc4..ecb0f27fb805e5ce517f5006ae4171aae56950a5 100644 (file)
@@ -1499,18 +1499,13 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
 //sys  keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
 //sys  keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
 
-func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(unsafe.Pointer(rsa))
        msg.Namelen = uint32(SizeofSockaddrAny)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = &p[0]
-               iov.SetLen(len(p))
-       }
        var dummy byte
        if len(oob) > 0 {
-               if len(p) == 0 {
+               if emptyIovecs(iov) {
                        var sockType int
                        sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
                        if err != nil {
@@ -1518,15 +1513,19 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
                        }
                        // receive at least one normal byte
                        if sockType != SOCK_DGRAM {
-                               iov.Base = &dummy
-                               iov.SetLen(1)
+                               var iova [1]Iovec
+                               iova[0].Base = &dummy
+                               iova[0].SetLen(1)
+                               iov = iova[:]
                        }
                }
                msg.Control = &oob[0]
                msg.SetControllen(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = recvmsg(fd, &msg, flags); err != nil {
                return
        }
@@ -1535,18 +1534,15 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
        return
 }
 
-func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(ptr)
        msg.Namelen = uint32(salen)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = &p[0]
-               iov.SetLen(len(p))
-       }
        var dummy byte
+       var empty bool
        if len(oob) > 0 {
-               if len(p) == 0 {
+               empty = emptyIovecs(iov)
+               if empty {
                        var sockType int
                        sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
                        if err != nil {
@@ -1554,19 +1550,22 @@ func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags i
                        }
                        // send at least one normal byte
                        if sockType != SOCK_DGRAM {
-                               iov.Base = &dummy
-                               iov.SetLen(1)
+                               var iova [1]Iovec
+                               iova[0].Base = &dummy
+                               iova[0].SetLen(1)
                        }
                }
                msg.Control = &oob[0]
                msg.SetControllen(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = sendmsg(fd, &msg, flags); err != nil {
                return 0, err
        }
-       if len(oob) > 0 && len(p) == 0 {
+       if len(oob) > 0 && empty {
                n = 0
        }
        return n, nil
index 28ba7b8cb7188c597122bdfba72f2d2a6844dab6..0b69c3eff9665c8ee55fb2a9025549956227c839 100644 (file)
@@ -12,8 +12,6 @@ import "unsafe"
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
-//sys  Fstat(fd int, stat *Stat_t) (err error)
-//sys  Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
 //sys  Fstatfs(fd int, buf *Statfs_t) (err error)
 //sys  Ftruncate(fd int, length int64) (err error)
 //sysnb        Getegid() (egid int)
@@ -43,6 +41,43 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 
+func timespecFromStatxTimestamp(x StatxTimestamp) Timespec {
+       return Timespec{
+               Sec:  x.Sec,
+               Nsec: int64(x.Nsec),
+       }
+}
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) error {
+       var r Statx_t
+       // Do it the glibc way, add AT_NO_AUTOMOUNT.
+       if err := Statx(fd, path, AT_NO_AUTOMOUNT|flags, STATX_BASIC_STATS, &r); err != nil {
+               return err
+       }
+
+       stat.Dev = Mkdev(r.Dev_major, r.Dev_minor)
+       stat.Ino = r.Ino
+       stat.Mode = uint32(r.Mode)
+       stat.Nlink = r.Nlink
+       stat.Uid = r.Uid
+       stat.Gid = r.Gid
+       stat.Rdev = Mkdev(r.Rdev_major, r.Rdev_minor)
+       // hope we don't get to process files so large to overflow these size
+       // fields...
+       stat.Size = int64(r.Size)
+       stat.Blksize = int32(r.Blksize)
+       stat.Blocks = int64(r.Blocks)
+       stat.Atim = timespecFromStatxTimestamp(r.Atime)
+       stat.Mtim = timespecFromStatxTimestamp(r.Mtime)
+       stat.Ctim = timespecFromStatxTimestamp(r.Ctime)
+
+       return nil
+}
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+       return Fstatat(fd, "", stat, AT_EMPTY_PATH)
+}
+
 func Stat(path string, stat *Stat_t) (err error) {
        return Fstatat(AT_FDCWD, path, stat, 0)
 }
index 8ff7adba03927bc7f03b4351ae5b9cd0f975c5d9..925a748a39bd8cfb0b04bff4c477dbb2884e3d90 100644 (file)
@@ -22,6 +22,7 @@ import "unsafe"
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
 //sysnb        Getuid() (uid int)
 //sys  Listen(s int, n int) (err error)
+//sys  MemfdSecret(flags int) (fd int, err error)
 //sys  pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
 //sys  pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
 //sys  Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
index 30f285343ee44f5577641d6bad1b1e3ec8719338..1378489f8d7ffd1fa6d6c42e2f0f7918b5431090 100644 (file)
@@ -26,6 +26,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
        msghdr.Controllen = uint32(length)
 }
 
+func (msghdr *Msghdr) SetIovlen(length int) {
+       msghdr.Iovlen = uint32(length)
+}
+
 func (cmsg *Cmsghdr) SetLen(length int) {
        cmsg.Len = uint32(length)
 }
index 932996c75b69aa3e93dcc31e55289eecea136e02..b5ec457cdccb67c37be641f19379efb966a8ef46 100644 (file)
@@ -451,26 +451,25 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
 
 //sys  recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
 
-func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(unsafe.Pointer(rsa))
        msg.Namelen = uint32(SizeofSockaddrAny)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = (*int8)(unsafe.Pointer(&p[0]))
-               iov.SetLen(len(p))
-       }
-       var dummy int8
+       var dummy byte
        if len(oob) > 0 {
                // receive at least one normal byte
-               if len(p) == 0 {
-                       iov.Base = &dummy
-                       iov.SetLen(1)
+               if emptyIovecs(iov) {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
                }
                msg.Accrightslen = int32(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = recvmsg(fd, &msg, flags); n == -1 {
                return
        }
@@ -480,30 +479,31 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
 
 //sys  sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
 
-func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
        var msg Msghdr
        msg.Name = (*byte)(unsafe.Pointer(ptr))
        msg.Namelen = uint32(salen)
-       var iov Iovec
-       if len(p) > 0 {
-               iov.Base = (*int8)(unsafe.Pointer(&p[0]))
-               iov.SetLen(len(p))
-       }
-       var dummy int8
+       var dummy byte
+       var empty bool
        if len(oob) > 0 {
                // send at least one normal byte
-               if len(p) == 0 {
-                       iov.Base = &dummy
-                       iov.SetLen(1)
+               empty = emptyIovecs(iov)
+               if empty {
+                       var iova [1]Iovec
+                       iova[0].Base = &dummy
+                       iova[0].SetLen(1)
+                       iov = iova[:]
                }
                msg.Accrightslen = int32(len(oob))
        }
-       msg.Iov = &iov
-       msg.Iovlen = 1
+       if len(iov) > 0 {
+               msg.Iov = &iov[0]
+               msg.SetIovlen(len(iov))
+       }
        if n, err = sendmsg(fd, &msg, flags); err != nil {
                return 0, err
        }
-       if len(oob) > 0 && len(p) == 0 {
+       if len(oob) > 0 && empty {
                n = 0
        }
        return n, nil
index 70508afc1d1c754f79e7e60ce7a5d265cd7cffc4..1ff5060b512324567a22c253f6a20f0b49d69472 100644 (file)
@@ -338,8 +338,13 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
 }
 
 func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+       var iov [1]Iovec
+       if len(p) > 0 {
+               iov[0].Base = &p[0]
+               iov[0].SetLen(len(p))
+       }
        var rsa RawSockaddrAny
-       n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
+       n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa)
        // source address is only specified if the socket is unconnected
        if rsa.Addr.Family != AF_UNSPEC {
                from, err = anyToSockaddr(fd, &rsa)
@@ -347,12 +352,67 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
        return
 }
 
+// RecvmsgBuffers receives a message from a socket using the recvmsg
+// system call. The flags are passed to recvmsg. Any non-control data
+// read is scattered into the buffers slices. The results are:
+//   - n is the number of non-control data read into bufs
+//   - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage]
+//   - recvflags is flags returned by recvmsg
+//   - from is the address of the sender
+func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+       iov := make([]Iovec, len(buffers))
+       for i := range buffers {
+               if len(buffers[i]) > 0 {
+                       iov[i].Base = &buffers[i][0]
+                       iov[i].SetLen(len(buffers[i]))
+               } else {
+                       iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
+               }
+       }
+       var rsa RawSockaddrAny
+       n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa)
+       if err == nil && rsa.Addr.Family != AF_UNSPEC {
+               from, err = anyToSockaddr(fd, &rsa)
+       }
+       return
+}
+
 func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
        _, err = SendmsgN(fd, p, oob, to, flags)
        return
 }
 
 func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+       var iov [1]Iovec
+       if len(p) > 0 {
+               iov[0].Base = &p[0]
+               iov[0].SetLen(len(p))
+       }
+       var ptr unsafe.Pointer
+       var salen _Socklen
+       if to != nil {
+               ptr, salen, err = to.sockaddr()
+               if err != nil {
+                       return 0, err
+               }
+       }
+       return sendmsgN(fd, iov[:], oob, ptr, salen, flags)
+}
+
+// SendmsgBuffers sends a message on a socket to an address using the sendmsg
+// system call. The flags are passed to sendmsg. Any non-control data written
+// is gathered from buffers. The function returns the number of bytes written
+// to the socket.
+func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
+       iov := make([]Iovec, len(buffers))
+       for i := range buffers {
+               if len(buffers[i]) > 0 {
+                       iov[i].Base = &buffers[i][0]
+                       iov[i].SetLen(len(buffers[i]))
+               } else {
+                       iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
+               }
+       }
        var ptr unsafe.Pointer
        var salen _Socklen
        if to != nil {
@@ -361,7 +421,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
                        return 0, err
                }
        }
-       return sendmsgN(fd, p, oob, ptr, salen, flags)
+       return sendmsgN(fd, iov, oob, ptr, salen, flags)
 }
 
 func Send(s int, buf []byte, flags int) (err error) {
@@ -484,3 +544,13 @@ func Lutimes(path string, tv []Timeval) error {
        }
        return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
 }
+
+// emptyIovec reports whether there are no bytes in the slice of Iovec.
+func emptyIovecs(iov []Iovec) bool {
+       for i := range iov {
+               if iov[i].Len > 0 {
+                       return false
+               }
+       }
+       return true
+}
index 440900112cd42098c79710f8a691ffb20e35e3f1..f8c2c5138748ba918652ba2f6f0b2daba13a94d3 100644 (file)
@@ -151,6 +151,7 @@ const (
        BIOCSETF                       = 0x80084267
        BIOCSETFNR                     = 0x80084282
        BIOCSETIF                      = 0x8020426c
+       BIOCSETVLANPCP                 = 0x80044285
        BIOCSETWF                      = 0x8008427b
        BIOCSETZBUF                    = 0x800c4281
        BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
        DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
        DLT_INFINIBAND                 = 0xf7
        DLT_IPFILTER                   = 0x74
-       DLT_IPMB                       = 0xc7
+       DLT_IPMB_KONTRON               = 0xc7
        DLT_IPMB_LINUX                 = 0xd1
        DLT_IPMI_HPM_2                 = 0x104
        DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
        DLT_LINUX_LAPD                 = 0xb1
        DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
        DLT_LINUX_SLL                  = 0x71
+       DLT_LINUX_SLL2                 = 0x114
        DLT_LOOP                       = 0x6c
        DLT_LORATAP                    = 0x10e
        DLT_LTALK                      = 0x72
-       DLT_MATCHING_MAX               = 0x113
+       DLT_MATCHING_MAX               = 0x114
        DLT_MATCHING_MIN               = 0x68
        DLT_MFR                        = 0xb6
        DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
        IPPROTO_CMTP                   = 0x26
        IPPROTO_CPHB                   = 0x49
        IPPROTO_CPNX                   = 0x48
+       IPPROTO_DCCP                   = 0x21
        IPPROTO_DDP                    = 0x25
        IPPROTO_DGP                    = 0x56
        IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
        IPPROTO_SCTP                   = 0x84
        IPPROTO_SDRP                   = 0x2a
        IPPROTO_SEND                   = 0x103
-       IPPROTO_SEP                    = 0x21
        IPPROTO_SHIM6                  = 0x8c
        IPPROTO_SKIP                   = 0x39
        IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
        IPV6_V6ONLY                    = 0x1b
        IPV6_VERSION                   = 0x60
        IPV6_VERSION_MASK              = 0xf0
+       IPV6_VLAN_PCP                  = 0x4b
        IP_ADD_MEMBERSHIP              = 0xc
        IP_ADD_SOURCE_MEMBERSHIP       = 0x46
        IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
        IP_TOS                         = 0x3
        IP_TTL                         = 0x4
        IP_UNBLOCK_SOURCE              = 0x49
+       IP_VLAN_PCP                    = 0x4b
        ISIG                           = 0x80
        ISTRIP                         = 0x20
+       ITIMER_PROF                    = 0x2
+       ITIMER_REAL                    = 0x0
+       ITIMER_VIRTUAL                 = 0x1
        IXANY                          = 0x800
        IXOFF                          = 0x400
        IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
        KERN_VERSION                   = 0x4
        LOCAL_CONNWAIT                 = 0x4
        LOCAL_CREDS                    = 0x2
-       LOCAL_CREDS_PERSISTENT         = 0x3
        LOCAL_PEERCRED                 = 0x1
        LOCAL_VENDOR                   = 0x80000000
        LOCK_EX                        = 0x2
@@ -1179,6 +1185,8 @@ const (
        O_NONBLOCK                     = 0x4
        O_RDONLY                       = 0x0
        O_RDWR                         = 0x2
+       O_RESOLVE_BENEATH              = 0x800000
+       O_SEARCH                       = 0x40000
        O_SHLOCK                       = 0x10
        O_SYNC                         = 0x80
        O_TRUNC                        = 0x400
@@ -1189,6 +1197,10 @@ const (
        PARMRK                         = 0x8
        PARODD                         = 0x2000
        PENDIN                         = 0x20000000
+       PIOD_READ_D                    = 0x1
+       PIOD_READ_I                    = 0x3
+       PIOD_WRITE_D                   = 0x2
+       PIOD_WRITE_I                   = 0x4
        PRIO_PGRP                      = 0x1
        PRIO_PROCESS                   = 0x0
        PRIO_USER                      = 0x2
@@ -1196,6 +1208,60 @@ const (
        PROT_NONE                      = 0x0
        PROT_READ                      = 0x1
        PROT_WRITE                     = 0x2
+       PTRACE_DEFAULT                 = 0x1
+       PTRACE_EXEC                    = 0x1
+       PTRACE_FORK                    = 0x8
+       PTRACE_LWP                     = 0x10
+       PTRACE_SCE                     = 0x2
+       PTRACE_SCX                     = 0x4
+       PTRACE_SYSCALL                 = 0x6
+       PTRACE_VFORK                   = 0x20
+       PT_ATTACH                      = 0xa
+       PT_CLEARSTEP                   = 0x10
+       PT_CONTINUE                    = 0x7
+       PT_DETACH                      = 0xb
+       PT_FIRSTMACH                   = 0x40
+       PT_FOLLOW_FORK                 = 0x17
+       PT_GETDBREGS                   = 0x25
+       PT_GETFPREGS                   = 0x23
+       PT_GETFSBASE                   = 0x47
+       PT_GETGSBASE                   = 0x49
+       PT_GETLWPLIST                  = 0xf
+       PT_GETNUMLWPS                  = 0xe
+       PT_GETREGS                     = 0x21
+       PT_GETXMMREGS                  = 0x40
+       PT_GETXSTATE                   = 0x45
+       PT_GETXSTATE_INFO              = 0x44
+       PT_GET_EVENT_MASK              = 0x19
+       PT_GET_SC_ARGS                 = 0x1b
+       PT_GET_SC_RET                  = 0x1c
+       PT_IO                          = 0xc
+       PT_KILL                        = 0x8
+       PT_LWPINFO                     = 0xd
+       PT_LWP_EVENTS                  = 0x18
+       PT_READ_D                      = 0x2
+       PT_READ_I                      = 0x1
+       PT_RESUME                      = 0x13
+       PT_SETDBREGS                   = 0x26
+       PT_SETFPREGS                   = 0x24
+       PT_SETFSBASE                   = 0x48
+       PT_SETGSBASE                   = 0x4a
+       PT_SETREGS                     = 0x22
+       PT_SETSTEP                     = 0x11
+       PT_SETXMMREGS                  = 0x41
+       PT_SETXSTATE                   = 0x46
+       PT_SET_EVENT_MASK              = 0x1a
+       PT_STEP                        = 0x9
+       PT_SUSPEND                     = 0x12
+       PT_SYSCALL                     = 0x16
+       PT_TO_SCE                      = 0x14
+       PT_TO_SCX                      = 0x15
+       PT_TRACE_ME                    = 0x0
+       PT_VM_ENTRY                    = 0x29
+       PT_VM_TIMESTAMP                = 0x28
+       PT_WRITE_D                     = 0x5
+       PT_WRITE_I                     = 0x4
+       P_ZONEID                       = 0xc
        RLIMIT_AS                      = 0xa
        RLIMIT_CORE                    = 0x4
        RLIMIT_CPU                     = 0x0
@@ -1320,10 +1386,12 @@ const (
        SIOCGHWADDR                    = 0xc020693e
        SIOCGI2C                       = 0xc020693d
        SIOCGIFADDR                    = 0xc0206921
+       SIOCGIFALIAS                   = 0xc044692d
        SIOCGIFBRDADDR                 = 0xc0206923
        SIOCGIFCAP                     = 0xc020691f
        SIOCGIFCONF                    = 0xc0086924
        SIOCGIFDESCR                   = 0xc020692a
+       SIOCGIFDOWNREASON              = 0xc058699a
        SIOCGIFDSTADDR                 = 0xc0206922
        SIOCGIFFIB                     = 0xc020695c
        SIOCGIFFLAGS                   = 0xc0206911
@@ -1414,6 +1482,7 @@ const (
        SO_RCVBUF                      = 0x1002
        SO_RCVLOWAT                    = 0x1004
        SO_RCVTIMEO                    = 0x1006
+       SO_RERROR                      = 0x20000
        SO_REUSEADDR                   = 0x4
        SO_REUSEPORT                   = 0x200
        SO_REUSEPORT_LB                = 0x10000
@@ -1472,22 +1541,40 @@ const (
        TCOFLUSH                       = 0x2
        TCOOFF                         = 0x1
        TCOON                          = 0x2
+       TCPOPT_EOL                     = 0x0
+       TCPOPT_FAST_OPEN               = 0x22
+       TCPOPT_MAXSEG                  = 0x2
+       TCPOPT_NOP                     = 0x1
+       TCPOPT_PAD                     = 0x0
+       TCPOPT_SACK                    = 0x5
+       TCPOPT_SACK_PERMITTED          = 0x4
+       TCPOPT_SIGNATURE               = 0x13
+       TCPOPT_TIMESTAMP               = 0x8
+       TCPOPT_WINDOW                  = 0x3
        TCP_BBR_ACK_COMP_ALG           = 0x448
+       TCP_BBR_ALGORITHM              = 0x43b
        TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
        TCP_BBR_DRAIN_PG               = 0x42e
        TCP_BBR_EXTRA_GAIN             = 0x449
+       TCP_BBR_EXTRA_STATE            = 0x453
+       TCP_BBR_FLOOR_MIN_TSO          = 0x454
+       TCP_BBR_HDWR_PACE              = 0x451
+       TCP_BBR_HOLD_TARGET            = 0x436
        TCP_BBR_IWINTSO                = 0x42b
        TCP_BBR_LOWGAIN_FD             = 0x436
        TCP_BBR_LOWGAIN_HALF           = 0x435
        TCP_BBR_LOWGAIN_THRESH         = 0x434
        TCP_BBR_MAX_RTO                = 0x439
        TCP_BBR_MIN_RTO                = 0x438
+       TCP_BBR_MIN_TOPACEOUT          = 0x455
        TCP_BBR_ONE_RETRAN             = 0x431
        TCP_BBR_PACE_CROSS             = 0x442
        TCP_BBR_PACE_DEL_TAR           = 0x43f
+       TCP_BBR_PACE_OH                = 0x435
        TCP_BBR_PACE_PER_SEC           = 0x43e
        TCP_BBR_PACE_SEG_MAX           = 0x440
        TCP_BBR_PACE_SEG_MIN           = 0x441
+       TCP_BBR_POLICER_DETECT         = 0x457
        TCP_BBR_PROBE_RTT_GAIN         = 0x44d
        TCP_BBR_PROBE_RTT_INT          = 0x430
        TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1496,12 +1583,18 @@ const (
        TCP_BBR_REC_OVER_HPTS          = 0x43a
        TCP_BBR_RETRAN_WTSO            = 0x44b
        TCP_BBR_RWND_IS_APP            = 0x42f
+       TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
        TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
        TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
        TCP_BBR_STARTUP_PG             = 0x42d
+       TCP_BBR_TMR_PACE_OH            = 0x448
+       TCP_BBR_TSLIMITS               = 0x434
+       TCP_BBR_TSTMP_RAISES           = 0x456
        TCP_BBR_UNLIMITED              = 0x43b
        TCP_BBR_USEDEL_RATE            = 0x437
        TCP_BBR_USE_LOWGAIN            = 0x433
+       TCP_BBR_USE_RACK_CHEAT         = 0x450
+       TCP_BBR_UTTER_MAX_TSO          = 0x452
        TCP_CA_NAME_MAX                = 0x10
        TCP_CCALGOOPT                  = 0x41
        TCP_CONGESTION                 = 0x40
@@ -1541,6 +1634,7 @@ const (
        TCP_PCAP_OUT                   = 0x800
        TCP_RACK_EARLY_RECOV           = 0x423
        TCP_RACK_EARLY_SEG             = 0x424
+       TCP_RACK_GP_INCREASE           = 0x446
        TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
        TCP_RACK_MIN_PACE              = 0x445
        TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1554,7 +1648,6 @@ const (
        TCP_RACK_PRR_SENDALOT          = 0x421
        TCP_RACK_REORD_FADE            = 0x426
        TCP_RACK_REORD_THRESH          = 0x425
-       TCP_RACK_SESS_CWV              = 0x42a
        TCP_RACK_TLP_INC_VAR           = 0x429
        TCP_RACK_TLP_REDUCE            = 0x41c
        TCP_RACK_TLP_THRESH            = 0x427
@@ -1694,12 +1787,13 @@ const (
        EIDRM           = syscall.Errno(0x52)
        EILSEQ          = syscall.Errno(0x56)
        EINPROGRESS     = syscall.Errno(0x24)
+       EINTEGRITY      = syscall.Errno(0x61)
        EINTR           = syscall.Errno(0x4)
        EINVAL          = syscall.Errno(0x16)
        EIO             = syscall.Errno(0x5)
        EISCONN         = syscall.Errno(0x38)
        EISDIR          = syscall.Errno(0x15)
-       ELAST           = syscall.Errno(0x60)
+       ELAST           = syscall.Errno(0x61)
        ELOOP           = syscall.Errno(0x3e)
        EMFILE          = syscall.Errno(0x18)
        EMLINK          = syscall.Errno(0x1f)
@@ -1842,7 +1936,7 @@ var errorList = [...]struct {
        {32, "EPIPE", "broken pipe"},
        {33, "EDOM", "numerical argument out of domain"},
        {34, "ERANGE", "result too large"},
-       {35, "EAGAIN", "resource temporarily unavailable"},
+       {35, "EWOULDBLOCK", "resource temporarily unavailable"},
        {36, "EINPROGRESS", "operation now in progress"},
        {37, "EALREADY", "operation already in progress"},
        {38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1904,6 +1998,7 @@ var errorList = [...]struct {
        {94, "ECAPMODE", "not permitted in capability mode"},
        {95, "ENOTRECOVERABLE", "state not recoverable"},
        {96, "EOWNERDEAD", "previous owner died"},
+       {97, "EINTEGRITY", "integrity check failed"},
 }
 
 // Signal table
index 64520d31226b94632d384575d93f8ed4e05ad4bd..96310c3be1b0a43bcb6b62250b8aeef78a1c28ef 100644 (file)
@@ -151,6 +151,7 @@ const (
        BIOCSETF                       = 0x80104267
        BIOCSETFNR                     = 0x80104282
        BIOCSETIF                      = 0x8020426c
+       BIOCSETVLANPCP                 = 0x80044285
        BIOCSETWF                      = 0x8010427b
        BIOCSETZBUF                    = 0x80184281
        BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
        DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
        DLT_INFINIBAND                 = 0xf7
        DLT_IPFILTER                   = 0x74
-       DLT_IPMB                       = 0xc7
+       DLT_IPMB_KONTRON               = 0xc7
        DLT_IPMB_LINUX                 = 0xd1
        DLT_IPMI_HPM_2                 = 0x104
        DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
        DLT_LINUX_LAPD                 = 0xb1
        DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
        DLT_LINUX_SLL                  = 0x71
+       DLT_LINUX_SLL2                 = 0x114
        DLT_LOOP                       = 0x6c
        DLT_LORATAP                    = 0x10e
        DLT_LTALK                      = 0x72
-       DLT_MATCHING_MAX               = 0x113
+       DLT_MATCHING_MAX               = 0x114
        DLT_MATCHING_MIN               = 0x68
        DLT_MFR                        = 0xb6
        DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
        IPPROTO_CMTP                   = 0x26
        IPPROTO_CPHB                   = 0x49
        IPPROTO_CPNX                   = 0x48
+       IPPROTO_DCCP                   = 0x21
        IPPROTO_DDP                    = 0x25
        IPPROTO_DGP                    = 0x56
        IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
        IPPROTO_SCTP                   = 0x84
        IPPROTO_SDRP                   = 0x2a
        IPPROTO_SEND                   = 0x103
-       IPPROTO_SEP                    = 0x21
        IPPROTO_SHIM6                  = 0x8c
        IPPROTO_SKIP                   = 0x39
        IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
        IPV6_V6ONLY                    = 0x1b
        IPV6_VERSION                   = 0x60
        IPV6_VERSION_MASK              = 0xf0
+       IPV6_VLAN_PCP                  = 0x4b
        IP_ADD_MEMBERSHIP              = 0xc
        IP_ADD_SOURCE_MEMBERSHIP       = 0x46
        IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
        IP_TOS                         = 0x3
        IP_TTL                         = 0x4
        IP_UNBLOCK_SOURCE              = 0x49
+       IP_VLAN_PCP                    = 0x4b
        ISIG                           = 0x80
        ISTRIP                         = 0x20
+       ITIMER_PROF                    = 0x2
+       ITIMER_REAL                    = 0x0
+       ITIMER_VIRTUAL                 = 0x1
        IXANY                          = 0x800
        IXOFF                          = 0x400
        IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
        KERN_VERSION                   = 0x4
        LOCAL_CONNWAIT                 = 0x4
        LOCAL_CREDS                    = 0x2
-       LOCAL_CREDS_PERSISTENT         = 0x3
        LOCAL_PEERCRED                 = 0x1
        LOCAL_VENDOR                   = 0x80000000
        LOCK_EX                        = 0x2
@@ -1180,6 +1186,8 @@ const (
        O_NONBLOCK                     = 0x4
        O_RDONLY                       = 0x0
        O_RDWR                         = 0x2
+       O_RESOLVE_BENEATH              = 0x800000
+       O_SEARCH                       = 0x40000
        O_SHLOCK                       = 0x10
        O_SYNC                         = 0x80
        O_TRUNC                        = 0x400
@@ -1190,6 +1198,10 @@ const (
        PARMRK                         = 0x8
        PARODD                         = 0x2000
        PENDIN                         = 0x20000000
+       PIOD_READ_D                    = 0x1
+       PIOD_READ_I                    = 0x3
+       PIOD_WRITE_D                   = 0x2
+       PIOD_WRITE_I                   = 0x4
        PRIO_PGRP                      = 0x1
        PRIO_PROCESS                   = 0x0
        PRIO_USER                      = 0x2
@@ -1197,6 +1209,58 @@ const (
        PROT_NONE                      = 0x0
        PROT_READ                      = 0x1
        PROT_WRITE                     = 0x2
+       PTRACE_DEFAULT                 = 0x1
+       PTRACE_EXEC                    = 0x1
+       PTRACE_FORK                    = 0x8
+       PTRACE_LWP                     = 0x10
+       PTRACE_SCE                     = 0x2
+       PTRACE_SCX                     = 0x4
+       PTRACE_SYSCALL                 = 0x6
+       PTRACE_VFORK                   = 0x20
+       PT_ATTACH                      = 0xa
+       PT_CLEARSTEP                   = 0x10
+       PT_CONTINUE                    = 0x7
+       PT_DETACH                      = 0xb
+       PT_FIRSTMACH                   = 0x40
+       PT_FOLLOW_FORK                 = 0x17
+       PT_GETDBREGS                   = 0x25
+       PT_GETFPREGS                   = 0x23
+       PT_GETFSBASE                   = 0x47
+       PT_GETGSBASE                   = 0x49
+       PT_GETLWPLIST                  = 0xf
+       PT_GETNUMLWPS                  = 0xe
+       PT_GETREGS                     = 0x21
+       PT_GETXSTATE                   = 0x45
+       PT_GETXSTATE_INFO              = 0x44
+       PT_GET_EVENT_MASK              = 0x19
+       PT_GET_SC_ARGS                 = 0x1b
+       PT_GET_SC_RET                  = 0x1c
+       PT_IO                          = 0xc
+       PT_KILL                        = 0x8
+       PT_LWPINFO                     = 0xd
+       PT_LWP_EVENTS                  = 0x18
+       PT_READ_D                      = 0x2
+       PT_READ_I                      = 0x1
+       PT_RESUME                      = 0x13
+       PT_SETDBREGS                   = 0x26
+       PT_SETFPREGS                   = 0x24
+       PT_SETFSBASE                   = 0x48
+       PT_SETGSBASE                   = 0x4a
+       PT_SETREGS                     = 0x22
+       PT_SETSTEP                     = 0x11
+       PT_SETXSTATE                   = 0x46
+       PT_SET_EVENT_MASK              = 0x1a
+       PT_STEP                        = 0x9
+       PT_SUSPEND                     = 0x12
+       PT_SYSCALL                     = 0x16
+       PT_TO_SCE                      = 0x14
+       PT_TO_SCX                      = 0x15
+       PT_TRACE_ME                    = 0x0
+       PT_VM_ENTRY                    = 0x29
+       PT_VM_TIMESTAMP                = 0x28
+       PT_WRITE_D                     = 0x5
+       PT_WRITE_I                     = 0x4
+       P_ZONEID                       = 0xc
        RLIMIT_AS                      = 0xa
        RLIMIT_CORE                    = 0x4
        RLIMIT_CPU                     = 0x0
@@ -1321,10 +1385,12 @@ const (
        SIOCGHWADDR                    = 0xc020693e
        SIOCGI2C                       = 0xc020693d
        SIOCGIFADDR                    = 0xc0206921
+       SIOCGIFALIAS                   = 0xc044692d
        SIOCGIFBRDADDR                 = 0xc0206923
        SIOCGIFCAP                     = 0xc020691f
        SIOCGIFCONF                    = 0xc0106924
        SIOCGIFDESCR                   = 0xc020692a
+       SIOCGIFDOWNREASON              = 0xc058699a
        SIOCGIFDSTADDR                 = 0xc0206922
        SIOCGIFFIB                     = 0xc020695c
        SIOCGIFFLAGS                   = 0xc0206911
@@ -1415,6 +1481,7 @@ const (
        SO_RCVBUF                      = 0x1002
        SO_RCVLOWAT                    = 0x1004
        SO_RCVTIMEO                    = 0x1006
+       SO_RERROR                      = 0x20000
        SO_REUSEADDR                   = 0x4
        SO_REUSEPORT                   = 0x200
        SO_REUSEPORT_LB                = 0x10000
@@ -1473,22 +1540,40 @@ const (
        TCOFLUSH                       = 0x2
        TCOOFF                         = 0x1
        TCOON                          = 0x2
+       TCPOPT_EOL                     = 0x0
+       TCPOPT_FAST_OPEN               = 0x22
+       TCPOPT_MAXSEG                  = 0x2
+       TCPOPT_NOP                     = 0x1
+       TCPOPT_PAD                     = 0x0
+       TCPOPT_SACK                    = 0x5
+       TCPOPT_SACK_PERMITTED          = 0x4
+       TCPOPT_SIGNATURE               = 0x13
+       TCPOPT_TIMESTAMP               = 0x8
+       TCPOPT_WINDOW                  = 0x3
        TCP_BBR_ACK_COMP_ALG           = 0x448
+       TCP_BBR_ALGORITHM              = 0x43b
        TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
        TCP_BBR_DRAIN_PG               = 0x42e
        TCP_BBR_EXTRA_GAIN             = 0x449
+       TCP_BBR_EXTRA_STATE            = 0x453
+       TCP_BBR_FLOOR_MIN_TSO          = 0x454
+       TCP_BBR_HDWR_PACE              = 0x451
+       TCP_BBR_HOLD_TARGET            = 0x436
        TCP_BBR_IWINTSO                = 0x42b
        TCP_BBR_LOWGAIN_FD             = 0x436
        TCP_BBR_LOWGAIN_HALF           = 0x435
        TCP_BBR_LOWGAIN_THRESH         = 0x434
        TCP_BBR_MAX_RTO                = 0x439
        TCP_BBR_MIN_RTO                = 0x438
+       TCP_BBR_MIN_TOPACEOUT          = 0x455
        TCP_BBR_ONE_RETRAN             = 0x431
        TCP_BBR_PACE_CROSS             = 0x442
        TCP_BBR_PACE_DEL_TAR           = 0x43f
+       TCP_BBR_PACE_OH                = 0x435
        TCP_BBR_PACE_PER_SEC           = 0x43e
        TCP_BBR_PACE_SEG_MAX           = 0x440
        TCP_BBR_PACE_SEG_MIN           = 0x441
+       TCP_BBR_POLICER_DETECT         = 0x457
        TCP_BBR_PROBE_RTT_GAIN         = 0x44d
        TCP_BBR_PROBE_RTT_INT          = 0x430
        TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1497,12 +1582,18 @@ const (
        TCP_BBR_REC_OVER_HPTS          = 0x43a
        TCP_BBR_RETRAN_WTSO            = 0x44b
        TCP_BBR_RWND_IS_APP            = 0x42f
+       TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
        TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
        TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
        TCP_BBR_STARTUP_PG             = 0x42d
+       TCP_BBR_TMR_PACE_OH            = 0x448
+       TCP_BBR_TSLIMITS               = 0x434
+       TCP_BBR_TSTMP_RAISES           = 0x456
        TCP_BBR_UNLIMITED              = 0x43b
        TCP_BBR_USEDEL_RATE            = 0x437
        TCP_BBR_USE_LOWGAIN            = 0x433
+       TCP_BBR_USE_RACK_CHEAT         = 0x450
+       TCP_BBR_UTTER_MAX_TSO          = 0x452
        TCP_CA_NAME_MAX                = 0x10
        TCP_CCALGOOPT                  = 0x41
        TCP_CONGESTION                 = 0x40
@@ -1542,6 +1633,7 @@ const (
        TCP_PCAP_OUT                   = 0x800
        TCP_RACK_EARLY_RECOV           = 0x423
        TCP_RACK_EARLY_SEG             = 0x424
+       TCP_RACK_GP_INCREASE           = 0x446
        TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
        TCP_RACK_MIN_PACE              = 0x445
        TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1555,7 +1647,6 @@ const (
        TCP_RACK_PRR_SENDALOT          = 0x421
        TCP_RACK_REORD_FADE            = 0x426
        TCP_RACK_REORD_THRESH          = 0x425
-       TCP_RACK_SESS_CWV              = 0x42a
        TCP_RACK_TLP_INC_VAR           = 0x429
        TCP_RACK_TLP_REDUCE            = 0x41c
        TCP_RACK_TLP_THRESH            = 0x427
@@ -1693,12 +1784,13 @@ const (
        EIDRM           = syscall.Errno(0x52)
        EILSEQ          = syscall.Errno(0x56)
        EINPROGRESS     = syscall.Errno(0x24)
+       EINTEGRITY      = syscall.Errno(0x61)
        EINTR           = syscall.Errno(0x4)
        EINVAL          = syscall.Errno(0x16)
        EIO             = syscall.Errno(0x5)
        EISCONN         = syscall.Errno(0x38)
        EISDIR          = syscall.Errno(0x15)
-       ELAST           = syscall.Errno(0x60)
+       ELAST           = syscall.Errno(0x61)
        ELOOP           = syscall.Errno(0x3e)
        EMFILE          = syscall.Errno(0x18)
        EMLINK          = syscall.Errno(0x1f)
@@ -1841,7 +1933,7 @@ var errorList = [...]struct {
        {32, "EPIPE", "broken pipe"},
        {33, "EDOM", "numerical argument out of domain"},
        {34, "ERANGE", "result too large"},
-       {35, "EAGAIN", "resource temporarily unavailable"},
+       {35, "EWOULDBLOCK", "resource temporarily unavailable"},
        {36, "EINPROGRESS", "operation now in progress"},
        {37, "EALREADY", "operation already in progress"},
        {38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1903,6 +1995,7 @@ var errorList = [...]struct {
        {94, "ECAPMODE", "not permitted in capability mode"},
        {95, "ENOTRECOVERABLE", "state not recoverable"},
        {96, "EOWNERDEAD", "previous owner died"},
+       {97, "EINTEGRITY", "integrity check failed"},
 }
 
 // Signal table
index 99e9a0e06e95f785edf015ae06ebea1d5e313a4c..777b69defa04d021432716cfa04a88db95fc6fc3 100644 (file)
@@ -151,6 +151,7 @@ const (
        BIOCSETF                       = 0x80084267
        BIOCSETFNR                     = 0x80084282
        BIOCSETIF                      = 0x8020426c
+       BIOCSETVLANPCP                 = 0x80044285
        BIOCSETWF                      = 0x8008427b
        BIOCSETZBUF                    = 0x800c4281
        BIOCSHDRCMPLT                  = 0x80044275
@@ -362,7 +363,7 @@ const (
        CTL_KERN                       = 0x1
        CTL_MAXNAME                    = 0x18
        CTL_NET                        = 0x4
-       DIOCGATTR                      = 0xc144648e
+       DIOCGATTR                      = 0xc148648e
        DIOCGDELETE                    = 0x80106488
        DIOCGFLUSH                     = 0x20006487
        DIOCGFRONTSTUFF                = 0x40086486
@@ -377,7 +378,7 @@ const (
        DIOCGSTRIPESIZE                = 0x4008648b
        DIOCSKERNELDUMP                = 0x804c6490
        DIOCSKERNELDUMP_FREEBSD11      = 0x80046485
-       DIOCZONECMD                    = 0xc06c648f
+       DIOCZONECMD                    = 0xc078648f
        DLT_A429                       = 0xb8
        DLT_A653_ICM                   = 0xb9
        DLT_AIRONET_HEADER             = 0x78
@@ -407,7 +408,9 @@ const (
        DLT_C_HDLC_WITH_DIR            = 0xcd
        DLT_DBUS                       = 0xe7
        DLT_DECT                       = 0xdd
+       DLT_DISPLAYPORT_AUX            = 0x113
        DLT_DOCSIS                     = 0x8f
+       DLT_DOCSIS31_XRA31             = 0x111
        DLT_DVB_CI                     = 0xeb
        DLT_ECONET                     = 0x73
        DLT_EN10MB                     = 0x1
@@ -417,6 +420,7 @@ const (
        DLT_ERF                        = 0xc5
        DLT_ERF_ETH                    = 0xaf
        DLT_ERF_POS                    = 0xb0
+       DLT_ETHERNET_MPACKET           = 0x112
        DLT_FC_2                       = 0xe0
        DLT_FC_2_WITH_FRAME_DELIMS     = 0xe1
        DLT_FDDI                       = 0xa
@@ -444,7 +448,7 @@ const (
        DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
        DLT_INFINIBAND                 = 0xf7
        DLT_IPFILTER                   = 0x74
-       DLT_IPMB                       = 0xc7
+       DLT_IPMB_KONTRON               = 0xc7
        DLT_IPMB_LINUX                 = 0xd1
        DLT_IPMI_HPM_2                 = 0x104
        DLT_IPNET                      = 0xe2
@@ -484,9 +488,11 @@ const (
        DLT_LINUX_LAPD                 = 0xb1
        DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
        DLT_LINUX_SLL                  = 0x71
+       DLT_LINUX_SLL2                 = 0x114
        DLT_LOOP                       = 0x6c
+       DLT_LORATAP                    = 0x10e
        DLT_LTALK                      = 0x72
-       DLT_MATCHING_MAX               = 0x109
+       DLT_MATCHING_MAX               = 0x114
        DLT_MATCHING_MIN               = 0x68
        DLT_MFR                        = 0xb6
        DLT_MOST                       = 0xd3
@@ -502,7 +508,9 @@ const (
        DLT_NFC_LLCP                   = 0xf5
        DLT_NFLOG                      = 0xef
        DLT_NG40                       = 0xf4
+       DLT_NORDIC_BLE                 = 0x110
        DLT_NULL                       = 0x0
+       DLT_OPENFLOW                   = 0x10b
        DLT_PCI_EXP                    = 0x7d
        DLT_PFLOG                      = 0x75
        DLT_PFSYNC                     = 0x79
@@ -526,15 +534,18 @@ const (
        DLT_RTAC_SERIAL                = 0xfa
        DLT_SCCP                       = 0x8e
        DLT_SCTP                       = 0xf8
+       DLT_SDLC                       = 0x10c
        DLT_SITA                       = 0xc4
        DLT_SLIP                       = 0x8
        DLT_SLIP_BSDOS                 = 0xd
        DLT_STANAG_5066_D_PDU          = 0xed
        DLT_SUNATM                     = 0x7b
        DLT_SYMANTEC_FIREWALL          = 0x63
+       DLT_TI_LLN_SNIFFER             = 0x10d
        DLT_TZSP                       = 0x80
        DLT_USB                        = 0xba
        DLT_USBPCAP                    = 0xf9
+       DLT_USB_DARWIN                 = 0x10a
        DLT_USB_FREEBSD                = 0xba
        DLT_USB_LINUX                  = 0xbd
        DLT_USB_LINUX_MMAPPED          = 0xdc
@@ -554,6 +565,7 @@ const (
        DLT_USER7                      = 0x9a
        DLT_USER8                      = 0x9b
        DLT_USER9                      = 0x9c
+       DLT_VSOCK                      = 0x10f
        DLT_WATTSTOPPER_DLM            = 0x107
        DLT_WIHART                     = 0xdf
        DLT_WIRESHARK_UPPER_PDU        = 0xfc
@@ -578,6 +590,7 @@ const (
        ECHONL                         = 0x10
        ECHOPRT                        = 0x20
        EVFILT_AIO                     = -0x3
+       EVFILT_EMPTY                   = -0xd
        EVFILT_FS                      = -0x9
        EVFILT_LIO                     = -0xa
        EVFILT_PROC                    = -0x5
@@ -585,11 +598,12 @@ const (
        EVFILT_READ                    = -0x1
        EVFILT_SENDFILE                = -0xc
        EVFILT_SIGNAL                  = -0x6
-       EVFILT_SYSCOUNT                = 0xc
+       EVFILT_SYSCOUNT                = 0xd
        EVFILT_TIMER                   = -0x7
        EVFILT_USER                    = -0xb
        EVFILT_VNODE                   = -0x4
        EVFILT_WRITE                   = -0x2
+       EVNAMEMAP_NAME_SIZE            = 0x40
        EV_ADD                         = 0x1
        EV_CLEAR                       = 0x20
        EV_DELETE                      = 0x2
@@ -606,6 +620,7 @@ const (
        EV_RECEIPT                     = 0x40
        EV_SYSFLAGS                    = 0xf000
        EXTA                           = 0x4b00
+       EXTATTR_MAXNAMELEN             = 0xff
        EXTATTR_NAMESPACE_EMPTY        = 0x0
        EXTATTR_NAMESPACE_SYSTEM       = 0x2
        EXTATTR_NAMESPACE_USER         = 0x1
@@ -647,6 +662,7 @@ const (
        IEXTEN                         = 0x400
        IFAN_ARRIVAL                   = 0x0
        IFAN_DEPARTURE                 = 0x1
+       IFCAP_WOL_MAGIC                = 0x2000
        IFF_ALLMULTI                   = 0x200
        IFF_ALTPHYS                    = 0x4000
        IFF_BROADCAST                  = 0x2
@@ -663,6 +679,7 @@ const (
        IFF_MONITOR                    = 0x40000
        IFF_MULTICAST                  = 0x8000
        IFF_NOARP                      = 0x80
+       IFF_NOGROUP                    = 0x800000
        IFF_OACTIVE                    = 0x400
        IFF_POINTOPOINT                = 0x10
        IFF_PPROMISC                   = 0x20000
@@ -719,6 +736,7 @@ const (
        IPPROTO_CMTP                   = 0x26
        IPPROTO_CPHB                   = 0x49
        IPPROTO_CPNX                   = 0x48
+       IPPROTO_DCCP                   = 0x21
        IPPROTO_DDP                    = 0x25
        IPPROTO_DGP                    = 0x56
        IPPROTO_DIVERT                 = 0x102
@@ -799,7 +817,6 @@ const (
        IPPROTO_SCTP                   = 0x84
        IPPROTO_SDRP                   = 0x2a
        IPPROTO_SEND                   = 0x103
-       IPPROTO_SEP                    = 0x21
        IPPROTO_SHIM6                  = 0x8c
        IPPROTO_SKIP                   = 0x39
        IPPROTO_SPACER                 = 0x7fff
@@ -837,6 +854,7 @@ const (
        IPV6_DSTOPTS                   = 0x32
        IPV6_FLOWID                    = 0x43
        IPV6_FLOWINFO_MASK             = 0xffffff0f
+       IPV6_FLOWLABEL_LEN             = 0x14
        IPV6_FLOWLABEL_MASK            = 0xffff0f00
        IPV6_FLOWTYPE                  = 0x44
        IPV6_FRAGTTL                   = 0x78
@@ -857,13 +875,13 @@ const (
        IPV6_MAX_GROUP_SRC_FILTER      = 0x200
        IPV6_MAX_MEMBERSHIPS           = 0xfff
        IPV6_MAX_SOCK_SRC_FILTER       = 0x80
-       IPV6_MIN_MEMBERSHIPS           = 0x1f
        IPV6_MMTU                      = 0x500
        IPV6_MSFILTER                  = 0x4a
        IPV6_MULTICAST_HOPS            = 0xa
        IPV6_MULTICAST_IF              = 0x9
        IPV6_MULTICAST_LOOP            = 0xb
        IPV6_NEXTHOP                   = 0x30
+       IPV6_ORIGDSTADDR               = 0x48
        IPV6_PATHMTU                   = 0x2c
        IPV6_PKTINFO                   = 0x2e
        IPV6_PORTRANGE                 = 0xe
@@ -875,6 +893,7 @@ const (
        IPV6_RECVFLOWID                = 0x46
        IPV6_RECVHOPLIMIT              = 0x25
        IPV6_RECVHOPOPTS               = 0x27
+       IPV6_RECVORIGDSTADDR           = 0x48
        IPV6_RECVPATHMTU               = 0x2b
        IPV6_RECVPKTINFO               = 0x24
        IPV6_RECVRSSBUCKETID           = 0x47
@@ -894,6 +913,7 @@ const (
        IPV6_V6ONLY                    = 0x1b
        IPV6_VERSION                   = 0x60
        IPV6_VERSION_MASK              = 0xf0
+       IPV6_VLAN_PCP                  = 0x4b
        IP_ADD_MEMBERSHIP              = 0xc
        IP_ADD_SOURCE_MEMBERSHIP       = 0x46
        IP_BINDANY                     = 0x18
@@ -935,10 +955,8 @@ const (
        IP_MAX_MEMBERSHIPS             = 0xfff
        IP_MAX_SOCK_MUTE_FILTER        = 0x80
        IP_MAX_SOCK_SRC_FILTER         = 0x80
-       IP_MAX_SOURCE_FILTER           = 0x400
        IP_MF                          = 0x2000
        IP_MINTTL                      = 0x42
-       IP_MIN_MEMBERSHIPS             = 0x1f
        IP_MSFILTER                    = 0x4a
        IP_MSS                         = 0x240
        IP_MULTICAST_IF                = 0x9
@@ -948,6 +966,7 @@ const (
        IP_OFFMASK                     = 0x1fff
        IP_ONESBCAST                   = 0x17
        IP_OPTIONS                     = 0x1
+       IP_ORIGDSTADDR                 = 0x1b
        IP_PORTRANGE                   = 0x13
        IP_PORTRANGE_DEFAULT           = 0x0
        IP_PORTRANGE_HIGH              = 0x1
@@ -956,6 +975,7 @@ const (
        IP_RECVFLOWID                  = 0x5d
        IP_RECVIF                      = 0x14
        IP_RECVOPTS                    = 0x5
+       IP_RECVORIGDSTADDR             = 0x1b
        IP_RECVRETOPTS                 = 0x6
        IP_RECVRSSBUCKETID             = 0x5e
        IP_RECVTOS                     = 0x44
@@ -972,8 +992,12 @@ const (
        IP_TOS                         = 0x3
        IP_TTL                         = 0x4
        IP_UNBLOCK_SOURCE              = 0x49
+       IP_VLAN_PCP                    = 0x4b
        ISIG                           = 0x80
        ISTRIP                         = 0x20
+       ITIMER_PROF                    = 0x2
+       ITIMER_REAL                    = 0x0
+       ITIMER_VIRTUAL                 = 0x1
        IXANY                          = 0x800
        IXOFF                          = 0x400
        IXON                           = 0x200
@@ -983,7 +1007,6 @@ const (
        KERN_VERSION                   = 0x4
        LOCAL_CONNWAIT                 = 0x4
        LOCAL_CREDS                    = 0x2
-       LOCAL_CREDS_PERSISTENT         = 0x3
        LOCAL_PEERCRED                 = 0x1
        LOCAL_VENDOR                   = 0x80000000
        LOCK_EX                        = 0x2
@@ -1071,10 +1094,12 @@ const (
        MNT_SUSPEND                    = 0x4
        MNT_SYNCHRONOUS                = 0x2
        MNT_UNION                      = 0x20
+       MNT_UNTRUSTED                  = 0x800000000
        MNT_UPDATE                     = 0x10000
-       MNT_UPDATEMASK                 = 0x2d8d0807e
+       MNT_UPDATEMASK                 = 0xad8d0807e
        MNT_USER                       = 0x8000
-       MNT_VISFLAGMASK                = 0x3fef0ffff
+       MNT_VERIFIED                   = 0x400000000
+       MNT_VISFLAGMASK                = 0xffef0ffff
        MNT_WAIT                       = 0x1
        MSG_CMSG_CLOEXEC               = 0x40000
        MSG_COMPAT                     = 0x8000
@@ -1103,6 +1128,7 @@ const (
        NFDBITS                        = 0x20
        NOFLSH                         = 0x80000000
        NOKERNINFO                     = 0x2000000
+       NOTE_ABSTIME                   = 0x10
        NOTE_ATTRIB                    = 0x8
        NOTE_CHILD                     = 0x4
        NOTE_CLOSE                     = 0x100
@@ -1159,6 +1185,8 @@ const (
        O_NONBLOCK                     = 0x4
        O_RDONLY                       = 0x0
        O_RDWR                         = 0x2
+       O_RESOLVE_BENEATH              = 0x800000
+       O_SEARCH                       = 0x40000
        O_SHLOCK                       = 0x10
        O_SYNC                         = 0x80
        O_TRUNC                        = 0x400
@@ -1169,6 +1197,10 @@ const (
        PARMRK                         = 0x8
        PARODD                         = 0x2000
        PENDIN                         = 0x20000000
+       PIOD_READ_D                    = 0x1
+       PIOD_READ_I                    = 0x3
+       PIOD_WRITE_D                   = 0x2
+       PIOD_WRITE_I                   = 0x4
        PRIO_PGRP                      = 0x1
        PRIO_PROCESS                   = 0x0
        PRIO_USER                      = 0x2
@@ -1176,6 +1208,53 @@ const (
        PROT_NONE                      = 0x0
        PROT_READ                      = 0x1
        PROT_WRITE                     = 0x2
+       PTRACE_DEFAULT                 = 0x1
+       PTRACE_EXEC                    = 0x1
+       PTRACE_FORK                    = 0x8
+       PTRACE_LWP                     = 0x10
+       PTRACE_SCE                     = 0x2
+       PTRACE_SCX                     = 0x4
+       PTRACE_SYSCALL                 = 0x6
+       PTRACE_VFORK                   = 0x20
+       PT_ATTACH                      = 0xa
+       PT_CLEARSTEP                   = 0x10
+       PT_CONTINUE                    = 0x7
+       PT_DETACH                      = 0xb
+       PT_FIRSTMACH                   = 0x40
+       PT_FOLLOW_FORK                 = 0x17
+       PT_GETDBREGS                   = 0x25
+       PT_GETFPREGS                   = 0x23
+       PT_GETLWPLIST                  = 0xf
+       PT_GETNUMLWPS                  = 0xe
+       PT_GETREGS                     = 0x21
+       PT_GETVFPREGS                  = 0x40
+       PT_GET_EVENT_MASK              = 0x19
+       PT_GET_SC_ARGS                 = 0x1b
+       PT_GET_SC_RET                  = 0x1c
+       PT_IO                          = 0xc
+       PT_KILL                        = 0x8
+       PT_LWPINFO                     = 0xd
+       PT_LWP_EVENTS                  = 0x18
+       PT_READ_D                      = 0x2
+       PT_READ_I                      = 0x1
+       PT_RESUME                      = 0x13
+       PT_SETDBREGS                   = 0x26
+       PT_SETFPREGS                   = 0x24
+       PT_SETREGS                     = 0x22
+       PT_SETSTEP                     = 0x11
+       PT_SETVFPREGS                  = 0x41
+       PT_SET_EVENT_MASK              = 0x1a
+       PT_STEP                        = 0x9
+       PT_SUSPEND                     = 0x12
+       PT_SYSCALL                     = 0x16
+       PT_TO_SCE                      = 0x14
+       PT_TO_SCX                      = 0x15
+       PT_TRACE_ME                    = 0x0
+       PT_VM_ENTRY                    = 0x29
+       PT_VM_TIMESTAMP                = 0x28
+       PT_WRITE_D                     = 0x5
+       PT_WRITE_I                     = 0x4
+       P_ZONEID                       = 0xc
        RLIMIT_AS                      = 0xa
        RLIMIT_CORE                    = 0x4
        RLIMIT_CPU                     = 0x0
@@ -1257,7 +1336,6 @@ const (
        RTV_WEIGHT                     = 0x100
        RT_ALL_FIBS                    = -0x1
        RT_BLACKHOLE                   = 0x40
-       RT_CACHING_CONTEXT             = 0x1
        RT_DEFAULT_FIB                 = 0x0
        RT_HAS_GW                      = 0x80
        RT_HAS_HEADER                  = 0x10
@@ -1267,15 +1345,17 @@ const (
        RT_LLE_CACHE                   = 0x100
        RT_MAY_LOOP                    = 0x8
        RT_MAY_LOOP_BIT                = 0x3
-       RT_NORTREF                     = 0x2
        RT_REJECT                      = 0x20
        RUSAGE_CHILDREN                = -0x1
        RUSAGE_SELF                    = 0x0
        RUSAGE_THREAD                  = 0x1
        SCM_BINTIME                    = 0x4
        SCM_CREDS                      = 0x3
+       SCM_MONOTONIC                  = 0x6
+       SCM_REALTIME                   = 0x5
        SCM_RIGHTS                     = 0x1
        SCM_TIMESTAMP                  = 0x2
+       SCM_TIME_INFO                  = 0x7
        SEEK_CUR                       = 0x1
        SEEK_DATA                      = 0x3
        SEEK_END                       = 0x2
@@ -1299,10 +1379,12 @@ const (
        SIOCGHWADDR                    = 0xc020693e
        SIOCGI2C                       = 0xc020693d
        SIOCGIFADDR                    = 0xc0206921
+       SIOCGIFALIAS                   = 0xc044692d
        SIOCGIFBRDADDR                 = 0xc0206923
        SIOCGIFCAP                     = 0xc020691f
        SIOCGIFCONF                    = 0xc0086924
        SIOCGIFDESCR                   = 0xc020692a
+       SIOCGIFDOWNREASON              = 0xc058699a
        SIOCGIFDSTADDR                 = 0xc0206922
        SIOCGIFFIB                     = 0xc020695c
        SIOCGIFFLAGS                   = 0xc0206911
@@ -1318,8 +1400,11 @@ const (
        SIOCGIFPDSTADDR                = 0xc0206948
        SIOCGIFPHYS                    = 0xc0206935
        SIOCGIFPSRCADDR                = 0xc0206947
+       SIOCGIFRSSHASH                 = 0xc0186997
+       SIOCGIFRSSKEY                  = 0xc0946996
        SIOCGIFSTATUS                  = 0xc331693b
        SIOCGIFXMEDIA                  = 0xc028698b
+       SIOCGLANPCP                    = 0xc0206998
        SIOCGLOWAT                     = 0x40047303
        SIOCGPGRP                      = 0x40047309
        SIOCGPRIVATE_0                 = 0xc0206950
@@ -1350,6 +1435,7 @@ const (
        SIOCSIFPHYS                    = 0x80206936
        SIOCSIFRVNET                   = 0xc020695b
        SIOCSIFVNET                    = 0xc020695a
+       SIOCSLANPCP                    = 0x80206999
        SIOCSLOWAT                     = 0x80047302
        SIOCSPGRP                      = 0x80047308
        SIOCSTUNFIB                    = 0x8020695f
@@ -1369,6 +1455,7 @@ const (
        SO_BINTIME                     = 0x2000
        SO_BROADCAST                   = 0x20
        SO_DEBUG                       = 0x1
+       SO_DOMAIN                      = 0x1019
        SO_DONTROUTE                   = 0x10
        SO_ERROR                       = 0x1007
        SO_KEEPALIVE                   = 0x8
@@ -1377,6 +1464,7 @@ const (
        SO_LISTENINCQLEN               = 0x1013
        SO_LISTENQLEN                  = 0x1012
        SO_LISTENQLIMIT                = 0x1011
+       SO_MAX_PACING_RATE             = 0x1018
        SO_NOSIGPIPE                   = 0x800
        SO_NO_DDP                      = 0x8000
        SO_NO_OFFLOAD                  = 0x4000
@@ -1387,13 +1475,22 @@ const (
        SO_RCVBUF                      = 0x1002
        SO_RCVLOWAT                    = 0x1004
        SO_RCVTIMEO                    = 0x1006
+       SO_RERROR                      = 0x20000
        SO_REUSEADDR                   = 0x4
        SO_REUSEPORT                   = 0x200
+       SO_REUSEPORT_LB                = 0x10000
        SO_SETFIB                      = 0x1014
        SO_SNDBUF                      = 0x1001
        SO_SNDLOWAT                    = 0x1003
        SO_SNDTIMEO                    = 0x1005
        SO_TIMESTAMP                   = 0x400
+       SO_TS_BINTIME                  = 0x1
+       SO_TS_CLOCK                    = 0x1017
+       SO_TS_CLOCK_MAX                = 0x3
+       SO_TS_DEFAULT                  = 0x0
+       SO_TS_MONOTONIC                = 0x3
+       SO_TS_REALTIME                 = 0x2
+       SO_TS_REALTIME_MICRO           = 0x0
        SO_TYPE                        = 0x1008
        SO_USELOOPBACK                 = 0x40
        SO_USER_COOKIE                 = 0x1015
@@ -1437,10 +1534,69 @@ const (
        TCOFLUSH                       = 0x2
        TCOOFF                         = 0x1
        TCOON                          = 0x2
+       TCPOPT_EOL                     = 0x0
+       TCPOPT_FAST_OPEN               = 0x22
+       TCPOPT_MAXSEG                  = 0x2
+       TCPOPT_NOP                     = 0x1
+       TCPOPT_PAD                     = 0x0
+       TCPOPT_SACK                    = 0x5
+       TCPOPT_SACK_PERMITTED          = 0x4
+       TCPOPT_SIGNATURE               = 0x13
+       TCPOPT_TIMESTAMP               = 0x8
+       TCPOPT_WINDOW                  = 0x3
+       TCP_BBR_ACK_COMP_ALG           = 0x448
+       TCP_BBR_ALGORITHM              = 0x43b
+       TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
+       TCP_BBR_DRAIN_PG               = 0x42e
+       TCP_BBR_EXTRA_GAIN             = 0x449
+       TCP_BBR_EXTRA_STATE            = 0x453
+       TCP_BBR_FLOOR_MIN_TSO          = 0x454
+       TCP_BBR_HDWR_PACE              = 0x451
+       TCP_BBR_HOLD_TARGET            = 0x436
+       TCP_BBR_IWINTSO                = 0x42b
+       TCP_BBR_LOWGAIN_FD             = 0x436
+       TCP_BBR_LOWGAIN_HALF           = 0x435
+       TCP_BBR_LOWGAIN_THRESH         = 0x434
+       TCP_BBR_MAX_RTO                = 0x439
+       TCP_BBR_MIN_RTO                = 0x438
+       TCP_BBR_MIN_TOPACEOUT          = 0x455
+       TCP_BBR_ONE_RETRAN             = 0x431
+       TCP_BBR_PACE_CROSS             = 0x442
+       TCP_BBR_PACE_DEL_TAR           = 0x43f
+       TCP_BBR_PACE_OH                = 0x435
+       TCP_BBR_PACE_PER_SEC           = 0x43e
+       TCP_BBR_PACE_SEG_MAX           = 0x440
+       TCP_BBR_PACE_SEG_MIN           = 0x441
+       TCP_BBR_POLICER_DETECT         = 0x457
+       TCP_BBR_PROBE_RTT_GAIN         = 0x44d
+       TCP_BBR_PROBE_RTT_INT          = 0x430
+       TCP_BBR_PROBE_RTT_LEN          = 0x44e
+       TCP_BBR_RACK_RTT_USE           = 0x44a
+       TCP_BBR_RECFORCE               = 0x42c
+       TCP_BBR_REC_OVER_HPTS          = 0x43a
+       TCP_BBR_RETRAN_WTSO            = 0x44b
+       TCP_BBR_RWND_IS_APP            = 0x42f
+       TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
+       TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
+       TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
+       TCP_BBR_STARTUP_PG             = 0x42d
+       TCP_BBR_TMR_PACE_OH            = 0x448
+       TCP_BBR_TSLIMITS               = 0x434
+       TCP_BBR_TSTMP_RAISES           = 0x456
+       TCP_BBR_UNLIMITED              = 0x43b
+       TCP_BBR_USEDEL_RATE            = 0x437
+       TCP_BBR_USE_LOWGAIN            = 0x433
+       TCP_BBR_USE_RACK_CHEAT         = 0x450
+       TCP_BBR_UTTER_MAX_TSO          = 0x452
        TCP_CA_NAME_MAX                = 0x10
        TCP_CCALGOOPT                  = 0x41
        TCP_CONGESTION                 = 0x40
+       TCP_DATA_AFTER_CLOSE           = 0x44c
+       TCP_DELACK                     = 0x48
        TCP_FASTOPEN                   = 0x401
+       TCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10
+       TCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4
+       TCP_FASTOPEN_PSK_LEN           = 0x10
        TCP_FUNCTION_BLK               = 0x2000
        TCP_FUNCTION_NAME_LEN_MAX      = 0x20
        TCP_INFO                       = 0x20
@@ -1448,6 +1604,12 @@ const (
        TCP_KEEPIDLE                   = 0x100
        TCP_KEEPINIT                   = 0x80
        TCP_KEEPINTVL                  = 0x200
+       TCP_LOG                        = 0x22
+       TCP_LOGBUF                     = 0x23
+       TCP_LOGDUMP                    = 0x25
+       TCP_LOGDUMPID                  = 0x26
+       TCP_LOGID                      = 0x24
+       TCP_LOG_ID_LEN                 = 0x40
        TCP_MAXBURST                   = 0x4
        TCP_MAXHLEN                    = 0x3c
        TCP_MAXOLEN                    = 0x28
@@ -1463,8 +1625,30 @@ const (
        TCP_NOPUSH                     = 0x4
        TCP_PCAP_IN                    = 0x1000
        TCP_PCAP_OUT                   = 0x800
+       TCP_RACK_EARLY_RECOV           = 0x423
+       TCP_RACK_EARLY_SEG             = 0x424
+       TCP_RACK_GP_INCREASE           = 0x446
+       TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
+       TCP_RACK_MIN_PACE              = 0x445
+       TCP_RACK_MIN_PACE_SEG          = 0x446
+       TCP_RACK_MIN_TO                = 0x422
+       TCP_RACK_PACE_ALWAYS           = 0x41f
+       TCP_RACK_PACE_MAX_SEG          = 0x41e
+       TCP_RACK_PACE_REDUCE           = 0x41d
+       TCP_RACK_PKT_DELAY             = 0x428
+       TCP_RACK_PROP                  = 0x41b
+       TCP_RACK_PROP_RATE             = 0x420
+       TCP_RACK_PRR_SENDALOT          = 0x421
+       TCP_RACK_REORD_FADE            = 0x426
+       TCP_RACK_REORD_THRESH          = 0x425
+       TCP_RACK_TLP_INC_VAR           = 0x429
+       TCP_RACK_TLP_REDUCE            = 0x41c
+       TCP_RACK_TLP_THRESH            = 0x427
+       TCP_RACK_TLP_USE               = 0x447
        TCP_VENDOR                     = 0x80000000
        TCSAFLUSH                      = 0x2
+       TIMER_ABSTIME                  = 0x1
+       TIMER_RELTIME                  = 0x0
        TIOCCBRK                       = 0x2000747a
        TIOCCDTR                       = 0x20007478
        TIOCCONS                       = 0x80047462
@@ -1528,6 +1712,8 @@ const (
        TIOCTIMESTAMP                  = 0x40107459
        TIOCUCNTL                      = 0x80047466
        TOSTOP                         = 0x400000
+       UTIME_NOW                      = -0x1
+       UTIME_OMIT                     = -0x2
        VDISCARD                       = 0xf
        VDSUSP                         = 0xb
        VEOF                           = 0x0
@@ -1592,12 +1778,13 @@ const (
        EIDRM           = syscall.Errno(0x52)
        EILSEQ          = syscall.Errno(0x56)
        EINPROGRESS     = syscall.Errno(0x24)
+       EINTEGRITY      = syscall.Errno(0x61)
        EINTR           = syscall.Errno(0x4)
        EINVAL          = syscall.Errno(0x16)
        EIO             = syscall.Errno(0x5)
        EISCONN         = syscall.Errno(0x38)
        EISDIR          = syscall.Errno(0x15)
-       ELAST           = syscall.Errno(0x60)
+       ELAST           = syscall.Errno(0x61)
        ELOOP           = syscall.Errno(0x3e)
        EMFILE          = syscall.Errno(0x18)
        EMLINK          = syscall.Errno(0x1f)
@@ -1740,7 +1927,7 @@ var errorList = [...]struct {
        {32, "EPIPE", "broken pipe"},
        {33, "EDOM", "numerical argument out of domain"},
        {34, "ERANGE", "result too large"},
-       {35, "EAGAIN", "resource temporarily unavailable"},
+       {35, "EWOULDBLOCK", "resource temporarily unavailable"},
        {36, "EINPROGRESS", "operation now in progress"},
        {37, "EALREADY", "operation already in progress"},
        {38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1802,6 +1989,7 @@ var errorList = [...]struct {
        {94, "ECAPMODE", "not permitted in capability mode"},
        {95, "ENOTRECOVERABLE", "state not recoverable"},
        {96, "EOWNERDEAD", "previous owner died"},
+       {97, "EINTEGRITY", "integrity check failed"},
 }
 
 // Signal table
index 4c837711493ff1bc346f749e9ea163a860abb16e..c557ac2db317ab67195166d5283b2b8d125a4974 100644 (file)
@@ -151,6 +151,7 @@ const (
        BIOCSETF                       = 0x80104267
        BIOCSETFNR                     = 0x80104282
        BIOCSETIF                      = 0x8020426c
+       BIOCSETVLANPCP                 = 0x80044285
        BIOCSETWF                      = 0x8010427b
        BIOCSETZBUF                    = 0x80184281
        BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
        DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
        DLT_INFINIBAND                 = 0xf7
        DLT_IPFILTER                   = 0x74
-       DLT_IPMB                       = 0xc7
+       DLT_IPMB_KONTRON               = 0xc7
        DLT_IPMB_LINUX                 = 0xd1
        DLT_IPMI_HPM_2                 = 0x104
        DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
        DLT_LINUX_LAPD                 = 0xb1
        DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
        DLT_LINUX_SLL                  = 0x71
+       DLT_LINUX_SLL2                 = 0x114
        DLT_LOOP                       = 0x6c
        DLT_LORATAP                    = 0x10e
        DLT_LTALK                      = 0x72
-       DLT_MATCHING_MAX               = 0x113
+       DLT_MATCHING_MAX               = 0x114
        DLT_MATCHING_MIN               = 0x68
        DLT_MFR                        = 0xb6
        DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
        IPPROTO_CMTP                   = 0x26
        IPPROTO_CPHB                   = 0x49
        IPPROTO_CPNX                   = 0x48
+       IPPROTO_DCCP                   = 0x21
        IPPROTO_DDP                    = 0x25
        IPPROTO_DGP                    = 0x56
        IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
        IPPROTO_SCTP                   = 0x84
        IPPROTO_SDRP                   = 0x2a
        IPPROTO_SEND                   = 0x103
-       IPPROTO_SEP                    = 0x21
        IPPROTO_SHIM6                  = 0x8c
        IPPROTO_SKIP                   = 0x39
        IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
        IPV6_V6ONLY                    = 0x1b
        IPV6_VERSION                   = 0x60
        IPV6_VERSION_MASK              = 0xf0
+       IPV6_VLAN_PCP                  = 0x4b
        IP_ADD_MEMBERSHIP              = 0xc
        IP_ADD_SOURCE_MEMBERSHIP       = 0x46
        IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
        IP_TOS                         = 0x3
        IP_TTL                         = 0x4
        IP_UNBLOCK_SOURCE              = 0x49
+       IP_VLAN_PCP                    = 0x4b
        ISIG                           = 0x80
        ISTRIP                         = 0x20
+       ITIMER_PROF                    = 0x2
+       ITIMER_REAL                    = 0x0
+       ITIMER_VIRTUAL                 = 0x1
        IXANY                          = 0x800
        IXOFF                          = 0x400
        IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
        KERN_VERSION                   = 0x4
        LOCAL_CONNWAIT                 = 0x4
        LOCAL_CREDS                    = 0x2
-       LOCAL_CREDS_PERSISTENT         = 0x3
        LOCAL_PEERCRED                 = 0x1
        LOCAL_VENDOR                   = 0x80000000
        LOCK_EX                        = 0x2
@@ -1180,6 +1186,8 @@ const (
        O_NONBLOCK                     = 0x4
        O_RDONLY                       = 0x0
        O_RDWR                         = 0x2
+       O_RESOLVE_BENEATH              = 0x800000
+       O_SEARCH                       = 0x40000
        O_SHLOCK                       = 0x10
        O_SYNC                         = 0x80
        O_TRUNC                        = 0x400
@@ -1190,6 +1198,10 @@ const (
        PARMRK                         = 0x8
        PARODD                         = 0x2000
        PENDIN                         = 0x20000000
+       PIOD_READ_D                    = 0x1
+       PIOD_READ_I                    = 0x3
+       PIOD_WRITE_D                   = 0x2
+       PIOD_WRITE_I                   = 0x4
        PRIO_PGRP                      = 0x1
        PRIO_PROCESS                   = 0x0
        PRIO_USER                      = 0x2
@@ -1197,6 +1209,51 @@ const (
        PROT_NONE                      = 0x0
        PROT_READ                      = 0x1
        PROT_WRITE                     = 0x2
+       PTRACE_DEFAULT                 = 0x1
+       PTRACE_EXEC                    = 0x1
+       PTRACE_FORK                    = 0x8
+       PTRACE_LWP                     = 0x10
+       PTRACE_SCE                     = 0x2
+       PTRACE_SCX                     = 0x4
+       PTRACE_SYSCALL                 = 0x6
+       PTRACE_VFORK                   = 0x20
+       PT_ATTACH                      = 0xa
+       PT_CLEARSTEP                   = 0x10
+       PT_CONTINUE                    = 0x7
+       PT_DETACH                      = 0xb
+       PT_FIRSTMACH                   = 0x40
+       PT_FOLLOW_FORK                 = 0x17
+       PT_GETDBREGS                   = 0x25
+       PT_GETFPREGS                   = 0x23
+       PT_GETLWPLIST                  = 0xf
+       PT_GETNUMLWPS                  = 0xe
+       PT_GETREGS                     = 0x21
+       PT_GET_EVENT_MASK              = 0x19
+       PT_GET_SC_ARGS                 = 0x1b
+       PT_GET_SC_RET                  = 0x1c
+       PT_IO                          = 0xc
+       PT_KILL                        = 0x8
+       PT_LWPINFO                     = 0xd
+       PT_LWP_EVENTS                  = 0x18
+       PT_READ_D                      = 0x2
+       PT_READ_I                      = 0x1
+       PT_RESUME                      = 0x13
+       PT_SETDBREGS                   = 0x26
+       PT_SETFPREGS                   = 0x24
+       PT_SETREGS                     = 0x22
+       PT_SETSTEP                     = 0x11
+       PT_SET_EVENT_MASK              = 0x1a
+       PT_STEP                        = 0x9
+       PT_SUSPEND                     = 0x12
+       PT_SYSCALL                     = 0x16
+       PT_TO_SCE                      = 0x14
+       PT_TO_SCX                      = 0x15
+       PT_TRACE_ME                    = 0x0
+       PT_VM_ENTRY                    = 0x29
+       PT_VM_TIMESTAMP                = 0x28
+       PT_WRITE_D                     = 0x5
+       PT_WRITE_I                     = 0x4
+       P_ZONEID                       = 0xc
        RLIMIT_AS                      = 0xa
        RLIMIT_CORE                    = 0x4
        RLIMIT_CPU                     = 0x0
@@ -1321,10 +1378,12 @@ const (
        SIOCGHWADDR                    = 0xc020693e
        SIOCGI2C                       = 0xc020693d
        SIOCGIFADDR                    = 0xc0206921
+       SIOCGIFALIAS                   = 0xc044692d
        SIOCGIFBRDADDR                 = 0xc0206923
        SIOCGIFCAP                     = 0xc020691f
        SIOCGIFCONF                    = 0xc0106924
        SIOCGIFDESCR                   = 0xc020692a
+       SIOCGIFDOWNREASON              = 0xc058699a
        SIOCGIFDSTADDR                 = 0xc0206922
        SIOCGIFFIB                     = 0xc020695c
        SIOCGIFFLAGS                   = 0xc0206911
@@ -1415,6 +1474,7 @@ const (
        SO_RCVBUF                      = 0x1002
        SO_RCVLOWAT                    = 0x1004
        SO_RCVTIMEO                    = 0x1006
+       SO_RERROR                      = 0x20000
        SO_REUSEADDR                   = 0x4
        SO_REUSEPORT                   = 0x200
        SO_REUSEPORT_LB                = 0x10000
@@ -1473,22 +1533,40 @@ const (
        TCOFLUSH                       = 0x2
        TCOOFF                         = 0x1
        TCOON                          = 0x2
+       TCPOPT_EOL                     = 0x0
+       TCPOPT_FAST_OPEN               = 0x22
+       TCPOPT_MAXSEG                  = 0x2
+       TCPOPT_NOP                     = 0x1
+       TCPOPT_PAD                     = 0x0
+       TCPOPT_SACK                    = 0x5
+       TCPOPT_SACK_PERMITTED          = 0x4
+       TCPOPT_SIGNATURE               = 0x13
+       TCPOPT_TIMESTAMP               = 0x8
+       TCPOPT_WINDOW                  = 0x3
        TCP_BBR_ACK_COMP_ALG           = 0x448
+       TCP_BBR_ALGORITHM              = 0x43b
        TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
        TCP_BBR_DRAIN_PG               = 0x42e
        TCP_BBR_EXTRA_GAIN             = 0x449
+       TCP_BBR_EXTRA_STATE            = 0x453
+       TCP_BBR_FLOOR_MIN_TSO          = 0x454
+       TCP_BBR_HDWR_PACE              = 0x451
+       TCP_BBR_HOLD_TARGET            = 0x436
        TCP_BBR_IWINTSO                = 0x42b
        TCP_BBR_LOWGAIN_FD             = 0x436
        TCP_BBR_LOWGAIN_HALF           = 0x435
        TCP_BBR_LOWGAIN_THRESH         = 0x434
        TCP_BBR_MAX_RTO                = 0x439
        TCP_BBR_MIN_RTO                = 0x438
+       TCP_BBR_MIN_TOPACEOUT          = 0x455
        TCP_BBR_ONE_RETRAN             = 0x431
        TCP_BBR_PACE_CROSS             = 0x442
        TCP_BBR_PACE_DEL_TAR           = 0x43f
+       TCP_BBR_PACE_OH                = 0x435
        TCP_BBR_PACE_PER_SEC           = 0x43e
        TCP_BBR_PACE_SEG_MAX           = 0x440
        TCP_BBR_PACE_SEG_MIN           = 0x441
+       TCP_BBR_POLICER_DETECT         = 0x457
        TCP_BBR_PROBE_RTT_GAIN         = 0x44d
        TCP_BBR_PROBE_RTT_INT          = 0x430
        TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1497,12 +1575,18 @@ const (
        TCP_BBR_REC_OVER_HPTS          = 0x43a
        TCP_BBR_RETRAN_WTSO            = 0x44b
        TCP_BBR_RWND_IS_APP            = 0x42f
+       TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
        TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
        TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
        TCP_BBR_STARTUP_PG             = 0x42d
+       TCP_BBR_TMR_PACE_OH            = 0x448
+       TCP_BBR_TSLIMITS               = 0x434
+       TCP_BBR_TSTMP_RAISES           = 0x456
        TCP_BBR_UNLIMITED              = 0x43b
        TCP_BBR_USEDEL_RATE            = 0x437
        TCP_BBR_USE_LOWGAIN            = 0x433
+       TCP_BBR_USE_RACK_CHEAT         = 0x450
+       TCP_BBR_UTTER_MAX_TSO          = 0x452
        TCP_CA_NAME_MAX                = 0x10
        TCP_CCALGOOPT                  = 0x41
        TCP_CONGESTION                 = 0x40
@@ -1542,6 +1626,7 @@ const (
        TCP_PCAP_OUT                   = 0x800
        TCP_RACK_EARLY_RECOV           = 0x423
        TCP_RACK_EARLY_SEG             = 0x424
+       TCP_RACK_GP_INCREASE           = 0x446
        TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
        TCP_RACK_MIN_PACE              = 0x445
        TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1555,7 +1640,6 @@ const (
        TCP_RACK_PRR_SENDALOT          = 0x421
        TCP_RACK_REORD_FADE            = 0x426
        TCP_RACK_REORD_THRESH          = 0x425
-       TCP_RACK_SESS_CWV              = 0x42a
        TCP_RACK_TLP_INC_VAR           = 0x429
        TCP_RACK_TLP_REDUCE            = 0x41c
        TCP_RACK_TLP_THRESH            = 0x427
@@ -1694,12 +1778,13 @@ const (
        EIDRM           = syscall.Errno(0x52)
        EILSEQ          = syscall.Errno(0x56)
        EINPROGRESS     = syscall.Errno(0x24)
+       EINTEGRITY      = syscall.Errno(0x61)
        EINTR           = syscall.Errno(0x4)
        EINVAL          = syscall.Errno(0x16)
        EIO             = syscall.Errno(0x5)
        EISCONN         = syscall.Errno(0x38)
        EISDIR          = syscall.Errno(0x15)
-       ELAST           = syscall.Errno(0x60)
+       ELAST           = syscall.Errno(0x61)
        ELOOP           = syscall.Errno(0x3e)
        EMFILE          = syscall.Errno(0x18)
        EMLINK          = syscall.Errno(0x1f)
@@ -1842,7 +1927,7 @@ var errorList = [...]struct {
        {32, "EPIPE", "broken pipe"},
        {33, "EDOM", "numerical argument out of domain"},
        {34, "ERANGE", "result too large"},
-       {35, "EAGAIN", "resource temporarily unavailable"},
+       {35, "EWOULDBLOCK", "resource temporarily unavailable"},
        {36, "EINPROGRESS", "operation now in progress"},
        {37, "EALREADY", "operation already in progress"},
        {38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1904,6 +1989,7 @@ var errorList = [...]struct {
        {94, "ECAPMODE", "not permitted in capability mode"},
        {95, "ENOTRECOVERABLE", "state not recoverable"},
        {96, "EOWNERDEAD", "previous owner died"},
+       {97, "EINTEGRITY", "integrity check failed"},
 }
 
 // Signal table
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go b/src/cmd/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
new file mode 100644 (file)
index 0000000..341b4d9
--- /dev/null
@@ -0,0 +1,2148 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && freebsd
+// +build riscv64,freebsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+       AF_APPLETALK                   = 0x10
+       AF_ARP                         = 0x23
+       AF_ATM                         = 0x1e
+       AF_BLUETOOTH                   = 0x24
+       AF_CCITT                       = 0xa
+       AF_CHAOS                       = 0x5
+       AF_CNT                         = 0x15
+       AF_COIP                        = 0x14
+       AF_DATAKIT                     = 0x9
+       AF_DECnet                      = 0xc
+       AF_DLI                         = 0xd
+       AF_E164                        = 0x1a
+       AF_ECMA                        = 0x8
+       AF_HYLINK                      = 0xf
+       AF_HYPERV                      = 0x2b
+       AF_IEEE80211                   = 0x25
+       AF_IMPLINK                     = 0x3
+       AF_INET                        = 0x2
+       AF_INET6                       = 0x1c
+       AF_INET6_SDP                   = 0x2a
+       AF_INET_SDP                    = 0x28
+       AF_IPX                         = 0x17
+       AF_ISDN                        = 0x1a
+       AF_ISO                         = 0x7
+       AF_LAT                         = 0xe
+       AF_LINK                        = 0x12
+       AF_LOCAL                       = 0x1
+       AF_MAX                         = 0x2b
+       AF_NATM                        = 0x1d
+       AF_NETBIOS                     = 0x6
+       AF_NETGRAPH                    = 0x20
+       AF_OSI                         = 0x7
+       AF_PUP                         = 0x4
+       AF_ROUTE                       = 0x11
+       AF_SCLUSTER                    = 0x22
+       AF_SIP                         = 0x18
+       AF_SLOW                        = 0x21
+       AF_SNA                         = 0xb
+       AF_UNIX                        = 0x1
+       AF_UNSPEC                      = 0x0
+       AF_VENDOR00                    = 0x27
+       AF_VENDOR01                    = 0x29
+       AF_VENDOR03                    = 0x2d
+       AF_VENDOR04                    = 0x2f
+       AF_VENDOR05                    = 0x31
+       AF_VENDOR06                    = 0x33
+       AF_VENDOR07                    = 0x35
+       AF_VENDOR08                    = 0x37
+       AF_VENDOR09                    = 0x39
+       AF_VENDOR10                    = 0x3b
+       AF_VENDOR11                    = 0x3d
+       AF_VENDOR12                    = 0x3f
+       AF_VENDOR13                    = 0x41
+       AF_VENDOR14                    = 0x43
+       AF_VENDOR15                    = 0x45
+       AF_VENDOR16                    = 0x47
+       AF_VENDOR17                    = 0x49
+       AF_VENDOR18                    = 0x4b
+       AF_VENDOR19                    = 0x4d
+       AF_VENDOR20                    = 0x4f
+       AF_VENDOR21                    = 0x51
+       AF_VENDOR22                    = 0x53
+       AF_VENDOR23                    = 0x55
+       AF_VENDOR24                    = 0x57
+       AF_VENDOR25                    = 0x59
+       AF_VENDOR26                    = 0x5b
+       AF_VENDOR27                    = 0x5d
+       AF_VENDOR28                    = 0x5f
+       AF_VENDOR29                    = 0x61
+       AF_VENDOR30                    = 0x63
+       AF_VENDOR31                    = 0x65
+       AF_VENDOR32                    = 0x67
+       AF_VENDOR33                    = 0x69
+       AF_VENDOR34                    = 0x6b
+       AF_VENDOR35                    = 0x6d
+       AF_VENDOR36                    = 0x6f
+       AF_VENDOR37                    = 0x71
+       AF_VENDOR38                    = 0x73
+       AF_VENDOR39                    = 0x75
+       AF_VENDOR40                    = 0x77
+       AF_VENDOR41                    = 0x79
+       AF_VENDOR42                    = 0x7b
+       AF_VENDOR43                    = 0x7d
+       AF_VENDOR44                    = 0x7f
+       AF_VENDOR45                    = 0x81
+       AF_VENDOR46                    = 0x83
+       AF_VENDOR47                    = 0x85
+       ALTWERASE                      = 0x200
+       B0                             = 0x0
+       B1000000                       = 0xf4240
+       B110                           = 0x6e
+       B115200                        = 0x1c200
+       B1200                          = 0x4b0
+       B134                           = 0x86
+       B14400                         = 0x3840
+       B150                           = 0x96
+       B1500000                       = 0x16e360
+       B1800                          = 0x708
+       B19200                         = 0x4b00
+       B200                           = 0xc8
+       B2000000                       = 0x1e8480
+       B230400                        = 0x38400
+       B2400                          = 0x960
+       B2500000                       = 0x2625a0
+       B28800                         = 0x7080
+       B300                           = 0x12c
+       B3000000                       = 0x2dc6c0
+       B3500000                       = 0x3567e0
+       B38400                         = 0x9600
+       B4000000                       = 0x3d0900
+       B460800                        = 0x70800
+       B4800                          = 0x12c0
+       B50                            = 0x32
+       B500000                        = 0x7a120
+       B57600                         = 0xe100
+       B600                           = 0x258
+       B7200                          = 0x1c20
+       B75                            = 0x4b
+       B76800                         = 0x12c00
+       B921600                        = 0xe1000
+       B9600                          = 0x2580
+       BIOCFEEDBACK                   = 0x8004427c
+       BIOCFLUSH                      = 0x20004268
+       BIOCGBLEN                      = 0x40044266
+       BIOCGDIRECTION                 = 0x40044276
+       BIOCGDLT                       = 0x4004426a
+       BIOCGDLTLIST                   = 0xc0104279
+       BIOCGETBUFMODE                 = 0x4004427d
+       BIOCGETIF                      = 0x4020426b
+       BIOCGETZMAX                    = 0x4008427f
+       BIOCGHDRCMPLT                  = 0x40044274
+       BIOCGRSIG                      = 0x40044272
+       BIOCGRTIMEOUT                  = 0x4010426e
+       BIOCGSEESENT                   = 0x40044276
+       BIOCGSTATS                     = 0x4008426f
+       BIOCGTSTAMP                    = 0x40044283
+       BIOCIMMEDIATE                  = 0x80044270
+       BIOCLOCK                       = 0x2000427a
+       BIOCPROMISC                    = 0x20004269
+       BIOCROTZBUF                    = 0x40184280
+       BIOCSBLEN                      = 0xc0044266
+       BIOCSDIRECTION                 = 0x80044277
+       BIOCSDLT                       = 0x80044278
+       BIOCSETBUFMODE                 = 0x8004427e
+       BIOCSETF                       = 0x80104267
+       BIOCSETFNR                     = 0x80104282
+       BIOCSETIF                      = 0x8020426c
+       BIOCSETVLANPCP                 = 0x80044285
+       BIOCSETWF                      = 0x8010427b
+       BIOCSETZBUF                    = 0x80184281
+       BIOCSHDRCMPLT                  = 0x80044275
+       BIOCSRSIG                      = 0x80044273
+       BIOCSRTIMEOUT                  = 0x8010426d
+       BIOCSSEESENT                   = 0x80044277
+       BIOCSTSTAMP                    = 0x80044284
+       BIOCVERSION                    = 0x40044271
+       BPF_A                          = 0x10
+       BPF_ABS                        = 0x20
+       BPF_ADD                        = 0x0
+       BPF_ALIGNMENT                  = 0x8
+       BPF_ALU                        = 0x4
+       BPF_AND                        = 0x50
+       BPF_B                          = 0x10
+       BPF_BUFMODE_BUFFER             = 0x1
+       BPF_BUFMODE_ZBUF               = 0x2
+       BPF_DIV                        = 0x30
+       BPF_H                          = 0x8
+       BPF_IMM                        = 0x0
+       BPF_IND                        = 0x40
+       BPF_JA                         = 0x0
+       BPF_JEQ                        = 0x10
+       BPF_JGE                        = 0x30
+       BPF_JGT                        = 0x20
+       BPF_JMP                        = 0x5
+       BPF_JSET                       = 0x40
+       BPF_K                          = 0x0
+       BPF_LD                         = 0x0
+       BPF_LDX                        = 0x1
+       BPF_LEN                        = 0x80
+       BPF_LSH                        = 0x60
+       BPF_MAJOR_VERSION              = 0x1
+       BPF_MAXBUFSIZE                 = 0x80000
+       BPF_MAXINSNS                   = 0x200
+       BPF_MEM                        = 0x60
+       BPF_MEMWORDS                   = 0x10
+       BPF_MINBUFSIZE                 = 0x20
+       BPF_MINOR_VERSION              = 0x1
+       BPF_MISC                       = 0x7
+       BPF_MOD                        = 0x90
+       BPF_MSH                        = 0xa0
+       BPF_MUL                        = 0x20
+       BPF_NEG                        = 0x80
+       BPF_OR                         = 0x40
+       BPF_RELEASE                    = 0x30bb6
+       BPF_RET                        = 0x6
+       BPF_RSH                        = 0x70
+       BPF_ST                         = 0x2
+       BPF_STX                        = 0x3
+       BPF_SUB                        = 0x10
+       BPF_TAX                        = 0x0
+       BPF_TXA                        = 0x80
+       BPF_T_BINTIME                  = 0x2
+       BPF_T_BINTIME_FAST             = 0x102
+       BPF_T_BINTIME_MONOTONIC        = 0x202
+       BPF_T_BINTIME_MONOTONIC_FAST   = 0x302
+       BPF_T_FAST                     = 0x100
+       BPF_T_FLAG_MASK                = 0x300
+       BPF_T_FORMAT_MASK              = 0x3
+       BPF_T_MICROTIME                = 0x0
+       BPF_T_MICROTIME_FAST           = 0x100
+       BPF_T_MICROTIME_MONOTONIC      = 0x200
+       BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
+       BPF_T_MONOTONIC                = 0x200
+       BPF_T_MONOTONIC_FAST           = 0x300
+       BPF_T_NANOTIME                 = 0x1
+       BPF_T_NANOTIME_FAST            = 0x101
+       BPF_T_NANOTIME_MONOTONIC       = 0x201
+       BPF_T_NANOTIME_MONOTONIC_FAST  = 0x301
+       BPF_T_NONE                     = 0x3
+       BPF_T_NORMAL                   = 0x0
+       BPF_W                          = 0x0
+       BPF_X                          = 0x8
+       BPF_XOR                        = 0xa0
+       BRKINT                         = 0x2
+       CAP_ACCEPT                     = 0x200000020000000
+       CAP_ACL_CHECK                  = 0x400000000010000
+       CAP_ACL_DELETE                 = 0x400000000020000
+       CAP_ACL_GET                    = 0x400000000040000
+       CAP_ACL_SET                    = 0x400000000080000
+       CAP_ALL0                       = 0x20007ffffffffff
+       CAP_ALL1                       = 0x4000000001fffff
+       CAP_BIND                       = 0x200000040000000
+       CAP_BINDAT                     = 0x200008000000400
+       CAP_CHFLAGSAT                  = 0x200000000001400
+       CAP_CONNECT                    = 0x200000080000000
+       CAP_CONNECTAT                  = 0x200010000000400
+       CAP_CREATE                     = 0x200000000000040
+       CAP_EVENT                      = 0x400000000000020
+       CAP_EXTATTR_DELETE             = 0x400000000001000
+       CAP_EXTATTR_GET                = 0x400000000002000
+       CAP_EXTATTR_LIST               = 0x400000000004000
+       CAP_EXTATTR_SET                = 0x400000000008000
+       CAP_FCHDIR                     = 0x200000000000800
+       CAP_FCHFLAGS                   = 0x200000000001000
+       CAP_FCHMOD                     = 0x200000000002000
+       CAP_FCHMODAT                   = 0x200000000002400
+       CAP_FCHOWN                     = 0x200000000004000
+       CAP_FCHOWNAT                   = 0x200000000004400
+       CAP_FCNTL                      = 0x200000000008000
+       CAP_FCNTL_ALL                  = 0x78
+       CAP_FCNTL_GETFL                = 0x8
+       CAP_FCNTL_GETOWN               = 0x20
+       CAP_FCNTL_SETFL                = 0x10
+       CAP_FCNTL_SETOWN               = 0x40
+       CAP_FEXECVE                    = 0x200000000000080
+       CAP_FLOCK                      = 0x200000000010000
+       CAP_FPATHCONF                  = 0x200000000020000
+       CAP_FSCK                       = 0x200000000040000
+       CAP_FSTAT                      = 0x200000000080000
+       CAP_FSTATAT                    = 0x200000000080400
+       CAP_FSTATFS                    = 0x200000000100000
+       CAP_FSYNC                      = 0x200000000000100
+       CAP_FTRUNCATE                  = 0x200000000000200
+       CAP_FUTIMES                    = 0x200000000200000
+       CAP_FUTIMESAT                  = 0x200000000200400
+       CAP_GETPEERNAME                = 0x200000100000000
+       CAP_GETSOCKNAME                = 0x200000200000000
+       CAP_GETSOCKOPT                 = 0x200000400000000
+       CAP_IOCTL                      = 0x400000000000080
+       CAP_IOCTLS_ALL                 = 0x7fffffffffffffff
+       CAP_KQUEUE                     = 0x400000000100040
+       CAP_KQUEUE_CHANGE              = 0x400000000100000
+       CAP_KQUEUE_EVENT               = 0x400000000000040
+       CAP_LINKAT_SOURCE              = 0x200020000000400
+       CAP_LINKAT_TARGET              = 0x200000000400400
+       CAP_LISTEN                     = 0x200000800000000
+       CAP_LOOKUP                     = 0x200000000000400
+       CAP_MAC_GET                    = 0x400000000000001
+       CAP_MAC_SET                    = 0x400000000000002
+       CAP_MKDIRAT                    = 0x200000000800400
+       CAP_MKFIFOAT                   = 0x200000001000400
+       CAP_MKNODAT                    = 0x200000002000400
+       CAP_MMAP                       = 0x200000000000010
+       CAP_MMAP_R                     = 0x20000000000001d
+       CAP_MMAP_RW                    = 0x20000000000001f
+       CAP_MMAP_RWX                   = 0x20000000000003f
+       CAP_MMAP_RX                    = 0x20000000000003d
+       CAP_MMAP_W                     = 0x20000000000001e
+       CAP_MMAP_WX                    = 0x20000000000003e
+       CAP_MMAP_X                     = 0x20000000000003c
+       CAP_PDGETPID                   = 0x400000000000200
+       CAP_PDKILL                     = 0x400000000000800
+       CAP_PDWAIT                     = 0x400000000000400
+       CAP_PEELOFF                    = 0x200001000000000
+       CAP_POLL_EVENT                 = 0x400000000000020
+       CAP_PREAD                      = 0x20000000000000d
+       CAP_PWRITE                     = 0x20000000000000e
+       CAP_READ                       = 0x200000000000001
+       CAP_RECV                       = 0x200000000000001
+       CAP_RENAMEAT_SOURCE            = 0x200000004000400
+       CAP_RENAMEAT_TARGET            = 0x200040000000400
+       CAP_RIGHTS_VERSION             = 0x0
+       CAP_RIGHTS_VERSION_00          = 0x0
+       CAP_SEEK                       = 0x20000000000000c
+       CAP_SEEK_TELL                  = 0x200000000000004
+       CAP_SEM_GETVALUE               = 0x400000000000004
+       CAP_SEM_POST                   = 0x400000000000008
+       CAP_SEM_WAIT                   = 0x400000000000010
+       CAP_SEND                       = 0x200000000000002
+       CAP_SETSOCKOPT                 = 0x200002000000000
+       CAP_SHUTDOWN                   = 0x200004000000000
+       CAP_SOCK_CLIENT                = 0x200007780000003
+       CAP_SOCK_SERVER                = 0x200007f60000003
+       CAP_SYMLINKAT                  = 0x200000008000400
+       CAP_TTYHOOK                    = 0x400000000000100
+       CAP_UNLINKAT                   = 0x200000010000400
+       CAP_UNUSED0_44                 = 0x200080000000000
+       CAP_UNUSED0_57                 = 0x300000000000000
+       CAP_UNUSED1_22                 = 0x400000000200000
+       CAP_UNUSED1_57                 = 0x500000000000000
+       CAP_WRITE                      = 0x200000000000002
+       CFLUSH                         = 0xf
+       CLOCAL                         = 0x8000
+       CLOCK_BOOTTIME                 = 0x5
+       CLOCK_MONOTONIC                = 0x4
+       CLOCK_MONOTONIC_COARSE         = 0xc
+       CLOCK_MONOTONIC_FAST           = 0xc
+       CLOCK_MONOTONIC_PRECISE        = 0xb
+       CLOCK_PROCESS_CPUTIME_ID       = 0xf
+       CLOCK_PROF                     = 0x2
+       CLOCK_REALTIME                 = 0x0
+       CLOCK_REALTIME_COARSE          = 0xa
+       CLOCK_REALTIME_FAST            = 0xa
+       CLOCK_REALTIME_PRECISE         = 0x9
+       CLOCK_SECOND                   = 0xd
+       CLOCK_THREAD_CPUTIME_ID        = 0xe
+       CLOCK_UPTIME                   = 0x5
+       CLOCK_UPTIME_FAST              = 0x8
+       CLOCK_UPTIME_PRECISE           = 0x7
+       CLOCK_VIRTUAL                  = 0x1
+       CPUSTATES                      = 0x5
+       CP_IDLE                        = 0x4
+       CP_INTR                        = 0x3
+       CP_NICE                        = 0x1
+       CP_SYS                         = 0x2
+       CP_USER                        = 0x0
+       CREAD                          = 0x800
+       CRTSCTS                        = 0x30000
+       CS5                            = 0x0
+       CS6                            = 0x100
+       CS7                            = 0x200
+       CS8                            = 0x300
+       CSIZE                          = 0x300
+       CSTART                         = 0x11
+       CSTATUS                        = 0x14
+       CSTOP                          = 0x13
+       CSTOPB                         = 0x400
+       CSUSP                          = 0x1a
+       CTL_HW                         = 0x6
+       CTL_KERN                       = 0x1
+       CTL_MAXNAME                    = 0x18
+       CTL_NET                        = 0x4
+       DIOCGATTR                      = 0xc148648e
+       DIOCGDELETE                    = 0x80106488
+       DIOCGFLUSH                     = 0x20006487
+       DIOCGFWHEADS                   = 0x40046483
+       DIOCGFWSECTORS                 = 0x40046482
+       DIOCGIDENT                     = 0x41006489
+       DIOCGKERNELDUMP                = 0xc0986492
+       DIOCGMEDIASIZE                 = 0x40086481
+       DIOCGPHYSPATH                  = 0x4400648d
+       DIOCGPROVIDERNAME              = 0x4400648a
+       DIOCGSECTORSIZE                = 0x40046480
+       DIOCGSTRIPEOFFSET              = 0x4008648c
+       DIOCGSTRIPESIZE                = 0x4008648b
+       DIOCSKERNELDUMP                = 0x80986491
+       DIOCSKERNELDUMP_FREEBSD11      = 0x80046485
+       DIOCSKERNELDUMP_FREEBSD12      = 0x80506490
+       DIOCZONECMD                    = 0xc080648f
+       DLT_A429                       = 0xb8
+       DLT_A653_ICM                   = 0xb9
+       DLT_AIRONET_HEADER             = 0x78
+       DLT_AOS                        = 0xde
+       DLT_APPLE_IP_OVER_IEEE1394     = 0x8a
+       DLT_ARCNET                     = 0x7
+       DLT_ARCNET_LINUX               = 0x81
+       DLT_ATM_CLIP                   = 0x13
+       DLT_ATM_RFC1483                = 0xb
+       DLT_AURORA                     = 0x7e
+       DLT_AX25                       = 0x3
+       DLT_AX25_KISS                  = 0xca
+       DLT_BACNET_MS_TP               = 0xa5
+       DLT_BLUETOOTH_BREDR_BB         = 0xff
+       DLT_BLUETOOTH_HCI_H4           = 0xbb
+       DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+       DLT_BLUETOOTH_LE_LL            = 0xfb
+       DLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100
+       DLT_BLUETOOTH_LINUX_MONITOR    = 0xfe
+       DLT_CAN20B                     = 0xbe
+       DLT_CAN_SOCKETCAN              = 0xe3
+       DLT_CHAOS                      = 0x5
+       DLT_CHDLC                      = 0x68
+       DLT_CISCO_IOS                  = 0x76
+       DLT_CLASS_NETBSD_RAWAF         = 0x2240000
+       DLT_C_HDLC                     = 0x68
+       DLT_C_HDLC_WITH_DIR            = 0xcd
+       DLT_DBUS                       = 0xe7
+       DLT_DECT                       = 0xdd
+       DLT_DISPLAYPORT_AUX            = 0x113
+       DLT_DOCSIS                     = 0x8f
+       DLT_DOCSIS31_XRA31             = 0x111
+       DLT_DVB_CI                     = 0xeb
+       DLT_ECONET                     = 0x73
+       DLT_EN10MB                     = 0x1
+       DLT_EN3MB                      = 0x2
+       DLT_ENC                        = 0x6d
+       DLT_EPON                       = 0x103
+       DLT_ERF                        = 0xc5
+       DLT_ERF_ETH                    = 0xaf
+       DLT_ERF_POS                    = 0xb0
+       DLT_ETHERNET_MPACKET           = 0x112
+       DLT_FC_2                       = 0xe0
+       DLT_FC_2_WITH_FRAME_DELIMS     = 0xe1
+       DLT_FDDI                       = 0xa
+       DLT_FLEXRAY                    = 0xd2
+       DLT_FRELAY                     = 0x6b
+       DLT_FRELAY_WITH_DIR            = 0xce
+       DLT_GCOM_SERIAL                = 0xad
+       DLT_GCOM_T1E1                  = 0xac
+       DLT_GPF_F                      = 0xab
+       DLT_GPF_T                      = 0xaa
+       DLT_GPRS_LLC                   = 0xa9
+       DLT_GSMTAP_ABIS                = 0xda
+       DLT_GSMTAP_UM                  = 0xd9
+       DLT_IBM_SN                     = 0x92
+       DLT_IBM_SP                     = 0x91
+       DLT_IEEE802                    = 0x6
+       DLT_IEEE802_11                 = 0x69
+       DLT_IEEE802_11_RADIO           = 0x7f
+       DLT_IEEE802_11_RADIO_AVS       = 0xa3
+       DLT_IEEE802_15_4               = 0xc3
+       DLT_IEEE802_15_4_LINUX         = 0xbf
+       DLT_IEEE802_15_4_NOFCS         = 0xe6
+       DLT_IEEE802_15_4_NONASK_PHY    = 0xd7
+       DLT_IEEE802_16_MAC_CPS         = 0xbc
+       DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
+       DLT_INFINIBAND                 = 0xf7
+       DLT_IPFILTER                   = 0x74
+       DLT_IPMB_KONTRON               = 0xc7
+       DLT_IPMB_LINUX                 = 0xd1
+       DLT_IPMI_HPM_2                 = 0x104
+       DLT_IPNET                      = 0xe2
+       DLT_IPOIB                      = 0xf2
+       DLT_IPV4                       = 0xe4
+       DLT_IPV6                       = 0xe5
+       DLT_IP_OVER_FC                 = 0x7a
+       DLT_ISO_14443                  = 0x108
+       DLT_JUNIPER_ATM1               = 0x89
+       DLT_JUNIPER_ATM2               = 0x87
+       DLT_JUNIPER_ATM_CEMIC          = 0xee
+       DLT_JUNIPER_CHDLC              = 0xb5
+       DLT_JUNIPER_ES                 = 0x84
+       DLT_JUNIPER_ETHER              = 0xb2
+       DLT_JUNIPER_FIBRECHANNEL       = 0xea
+       DLT_JUNIPER_FRELAY             = 0xb4
+       DLT_JUNIPER_GGSN               = 0x85
+       DLT_JUNIPER_ISM                = 0xc2
+       DLT_JUNIPER_MFR                = 0x86
+       DLT_JUNIPER_MLFR               = 0x83
+       DLT_JUNIPER_MLPPP              = 0x82
+       DLT_JUNIPER_MONITOR            = 0xa4
+       DLT_JUNIPER_PIC_PEER           = 0xae
+       DLT_JUNIPER_PPP                = 0xb3
+       DLT_JUNIPER_PPPOE              = 0xa7
+       DLT_JUNIPER_PPPOE_ATM          = 0xa8
+       DLT_JUNIPER_SERVICES           = 0x88
+       DLT_JUNIPER_SRX_E2E            = 0xe9
+       DLT_JUNIPER_ST                 = 0xc8
+       DLT_JUNIPER_VP                 = 0xb7
+       DLT_JUNIPER_VS                 = 0xe8
+       DLT_LAPB_WITH_DIR              = 0xcf
+       DLT_LAPD                       = 0xcb
+       DLT_LIN                        = 0xd4
+       DLT_LINUX_EVDEV                = 0xd8
+       DLT_LINUX_IRDA                 = 0x90
+       DLT_LINUX_LAPD                 = 0xb1
+       DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
+       DLT_LINUX_SLL                  = 0x71
+       DLT_LINUX_SLL2                 = 0x114
+       DLT_LOOP                       = 0x6c
+       DLT_LORATAP                    = 0x10e
+       DLT_LTALK                      = 0x72
+       DLT_MATCHING_MAX               = 0x114
+       DLT_MATCHING_MIN               = 0x68
+       DLT_MFR                        = 0xb6
+       DLT_MOST                       = 0xd3
+       DLT_MPEG_2_TS                  = 0xf3
+       DLT_MPLS                       = 0xdb
+       DLT_MTP2                       = 0x8c
+       DLT_MTP2_WITH_PHDR             = 0x8b
+       DLT_MTP3                       = 0x8d
+       DLT_MUX27010                   = 0xec
+       DLT_NETANALYZER                = 0xf0
+       DLT_NETANALYZER_TRANSPARENT    = 0xf1
+       DLT_NETLINK                    = 0xfd
+       DLT_NFC_LLCP                   = 0xf5
+       DLT_NFLOG                      = 0xef
+       DLT_NG40                       = 0xf4
+       DLT_NORDIC_BLE                 = 0x110
+       DLT_NULL                       = 0x0
+       DLT_OPENFLOW                   = 0x10b
+       DLT_PCI_EXP                    = 0x7d
+       DLT_PFLOG                      = 0x75
+       DLT_PFSYNC                     = 0x79
+       DLT_PKTAP                      = 0x102
+       DLT_PPI                        = 0xc0
+       DLT_PPP                        = 0x9
+       DLT_PPP_BSDOS                  = 0xe
+       DLT_PPP_ETHER                  = 0x33
+       DLT_PPP_PPPD                   = 0xa6
+       DLT_PPP_SERIAL                 = 0x32
+       DLT_PPP_WITH_DIR               = 0xcc
+       DLT_PPP_WITH_DIRECTION         = 0xa6
+       DLT_PRISM_HEADER               = 0x77
+       DLT_PROFIBUS_DL                = 0x101
+       DLT_PRONET                     = 0x4
+       DLT_RAIF1                      = 0xc6
+       DLT_RAW                        = 0xc
+       DLT_RDS                        = 0x109
+       DLT_REDBACK_SMARTEDGE          = 0x20
+       DLT_RIO                        = 0x7c
+       DLT_RTAC_SERIAL                = 0xfa
+       DLT_SCCP                       = 0x8e
+       DLT_SCTP                       = 0xf8
+       DLT_SDLC                       = 0x10c
+       DLT_SITA                       = 0xc4
+       DLT_SLIP                       = 0x8
+       DLT_SLIP_BSDOS                 = 0xd
+       DLT_STANAG_5066_D_PDU          = 0xed
+       DLT_SUNATM                     = 0x7b
+       DLT_SYMANTEC_FIREWALL          = 0x63
+       DLT_TI_LLN_SNIFFER             = 0x10d
+       DLT_TZSP                       = 0x80
+       DLT_USB                        = 0xba
+       DLT_USBPCAP                    = 0xf9
+       DLT_USB_DARWIN                 = 0x10a
+       DLT_USB_FREEBSD                = 0xba
+       DLT_USB_LINUX                  = 0xbd
+       DLT_USB_LINUX_MMAPPED          = 0xdc
+       DLT_USER0                      = 0x93
+       DLT_USER1                      = 0x94
+       DLT_USER10                     = 0x9d
+       DLT_USER11                     = 0x9e
+       DLT_USER12                     = 0x9f
+       DLT_USER13                     = 0xa0
+       DLT_USER14                     = 0xa1
+       DLT_USER15                     = 0xa2
+       DLT_USER2                      = 0x95
+       DLT_USER3                      = 0x96
+       DLT_USER4                      = 0x97
+       DLT_USER5                      = 0x98
+       DLT_USER6                      = 0x99
+       DLT_USER7                      = 0x9a
+       DLT_USER8                      = 0x9b
+       DLT_USER9                      = 0x9c
+       DLT_VSOCK                      = 0x10f
+       DLT_WATTSTOPPER_DLM            = 0x107
+       DLT_WIHART                     = 0xdf
+       DLT_WIRESHARK_UPPER_PDU        = 0xfc
+       DLT_X2E_SERIAL                 = 0xd5
+       DLT_X2E_XORAYA                 = 0xd6
+       DLT_ZWAVE_R1_R2                = 0x105
+       DLT_ZWAVE_R3                   = 0x106
+       DT_BLK                         = 0x6
+       DT_CHR                         = 0x2
+       DT_DIR                         = 0x4
+       DT_FIFO                        = 0x1
+       DT_LNK                         = 0xa
+       DT_REG                         = 0x8
+       DT_SOCK                        = 0xc
+       DT_UNKNOWN                     = 0x0
+       DT_WHT                         = 0xe
+       ECHO                           = 0x8
+       ECHOCTL                        = 0x40
+       ECHOE                          = 0x2
+       ECHOK                          = 0x4
+       ECHOKE                         = 0x1
+       ECHONL                         = 0x10
+       ECHOPRT                        = 0x20
+       EHE_DEAD_PRIORITY              = -0x1
+       EVFILT_AIO                     = -0x3
+       EVFILT_EMPTY                   = -0xd
+       EVFILT_FS                      = -0x9
+       EVFILT_LIO                     = -0xa
+       EVFILT_PROC                    = -0x5
+       EVFILT_PROCDESC                = -0x8
+       EVFILT_READ                    = -0x1
+       EVFILT_SENDFILE                = -0xc
+       EVFILT_SIGNAL                  = -0x6
+       EVFILT_SYSCOUNT                = 0xd
+       EVFILT_TIMER                   = -0x7
+       EVFILT_USER                    = -0xb
+       EVFILT_VNODE                   = -0x4
+       EVFILT_WRITE                   = -0x2
+       EVNAMEMAP_NAME_SIZE            = 0x40
+       EV_ADD                         = 0x1
+       EV_CLEAR                       = 0x20
+       EV_DELETE                      = 0x2
+       EV_DISABLE                     = 0x8
+       EV_DISPATCH                    = 0x80
+       EV_DROP                        = 0x1000
+       EV_ENABLE                      = 0x4
+       EV_EOF                         = 0x8000
+       EV_ERROR                       = 0x4000
+       EV_FLAG1                       = 0x2000
+       EV_FLAG2                       = 0x4000
+       EV_FORCEONESHOT                = 0x100
+       EV_ONESHOT                     = 0x10
+       EV_RECEIPT                     = 0x40
+       EV_SYSFLAGS                    = 0xf000
+       EXTA                           = 0x4b00
+       EXTATTR_MAXNAMELEN             = 0xff
+       EXTATTR_NAMESPACE_EMPTY        = 0x0
+       EXTATTR_NAMESPACE_SYSTEM       = 0x2
+       EXTATTR_NAMESPACE_USER         = 0x1
+       EXTB                           = 0x9600
+       EXTPROC                        = 0x800
+       FD_CLOEXEC                     = 0x1
+       FD_NONE                        = -0xc8
+       FD_SETSIZE                     = 0x400
+       FLUSHO                         = 0x800000
+       F_ADD_SEALS                    = 0x13
+       F_CANCEL                       = 0x5
+       F_DUP2FD                       = 0xa
+       F_DUP2FD_CLOEXEC               = 0x12
+       F_DUPFD                        = 0x0
+       F_DUPFD_CLOEXEC                = 0x11
+       F_GETFD                        = 0x1
+       F_GETFL                        = 0x3
+       F_GETLK                        = 0xb
+       F_GETOWN                       = 0x5
+       F_GET_SEALS                    = 0x14
+       F_ISUNIONSTACK                 = 0x15
+       F_KINFO                        = 0x16
+       F_OGETLK                       = 0x7
+       F_OK                           = 0x0
+       F_OSETLK                       = 0x8
+       F_OSETLKW                      = 0x9
+       F_RDAHEAD                      = 0x10
+       F_RDLCK                        = 0x1
+       F_READAHEAD                    = 0xf
+       F_SEAL_GROW                    = 0x4
+       F_SEAL_SEAL                    = 0x1
+       F_SEAL_SHRINK                  = 0x2
+       F_SEAL_WRITE                   = 0x8
+       F_SETFD                        = 0x2
+       F_SETFL                        = 0x4
+       F_SETLK                        = 0xc
+       F_SETLKW                       = 0xd
+       F_SETLK_REMOTE                 = 0xe
+       F_SETOWN                       = 0x6
+       F_UNLCK                        = 0x2
+       F_UNLCKSYS                     = 0x4
+       F_WRLCK                        = 0x3
+       HUPCL                          = 0x4000
+       HW_MACHINE                     = 0x1
+       ICANON                         = 0x100
+       ICMP6_FILTER                   = 0x12
+       ICRNL                          = 0x100
+       IEXTEN                         = 0x400
+       IFAN_ARRIVAL                   = 0x0
+       IFAN_DEPARTURE                 = 0x1
+       IFCAP_WOL_MAGIC                = 0x2000
+       IFF_ALLMULTI                   = 0x200
+       IFF_ALTPHYS                    = 0x4000
+       IFF_BROADCAST                  = 0x2
+       IFF_CANTCHANGE                 = 0x218f72
+       IFF_CANTCONFIG                 = 0x10000
+       IFF_DEBUG                      = 0x4
+       IFF_DRV_OACTIVE                = 0x400
+       IFF_DRV_RUNNING                = 0x40
+       IFF_DYING                      = 0x200000
+       IFF_KNOWSEPOCH                 = 0x20
+       IFF_LINK0                      = 0x1000
+       IFF_LINK1                      = 0x2000
+       IFF_LINK2                      = 0x4000
+       IFF_LOOPBACK                   = 0x8
+       IFF_MONITOR                    = 0x40000
+       IFF_MULTICAST                  = 0x8000
+       IFF_NOARP                      = 0x80
+       IFF_NOGROUP                    = 0x800000
+       IFF_OACTIVE                    = 0x400
+       IFF_POINTOPOINT                = 0x10
+       IFF_PPROMISC                   = 0x20000
+       IFF_PROMISC                    = 0x100
+       IFF_RENAMING                   = 0x400000
+       IFF_RUNNING                    = 0x40
+       IFF_SIMPLEX                    = 0x800
+       IFF_STATICARP                  = 0x80000
+       IFF_UP                         = 0x1
+       IFNAMSIZ                       = 0x10
+       IFT_BRIDGE                     = 0xd1
+       IFT_CARP                       = 0xf8
+       IFT_IEEE1394                   = 0x90
+       IFT_INFINIBAND                 = 0xc7
+       IFT_L2VLAN                     = 0x87
+       IFT_L3IPVLAN                   = 0x88
+       IFT_PPP                        = 0x17
+       IFT_PROPVIRTUAL                = 0x35
+       IGNBRK                         = 0x1
+       IGNCR                          = 0x80
+       IGNPAR                         = 0x4
+       IMAXBEL                        = 0x2000
+       INLCR                          = 0x40
+       INPCK                          = 0x10
+       IN_CLASSA_HOST                 = 0xffffff
+       IN_CLASSA_MAX                  = 0x80
+       IN_CLASSA_NET                  = 0xff000000
+       IN_CLASSA_NSHIFT               = 0x18
+       IN_CLASSB_HOST                 = 0xffff
+       IN_CLASSB_MAX                  = 0x10000
+       IN_CLASSB_NET                  = 0xffff0000
+       IN_CLASSB_NSHIFT               = 0x10
+       IN_CLASSC_HOST                 = 0xff
+       IN_CLASSC_NET                  = 0xffffff00
+       IN_CLASSC_NSHIFT               = 0x8
+       IN_CLASSD_HOST                 = 0xfffffff
+       IN_CLASSD_NET                  = 0xf0000000
+       IN_CLASSD_NSHIFT               = 0x1c
+       IN_LOOPBACKNET                 = 0x7f
+       IN_NETMASK_DEFAULT             = 0xffffff00
+       IN_RFC3021_MASK                = 0xfffffffe
+       IPPROTO_3PC                    = 0x22
+       IPPROTO_ADFS                   = 0x44
+       IPPROTO_AH                     = 0x33
+       IPPROTO_AHIP                   = 0x3d
+       IPPROTO_APES                   = 0x63
+       IPPROTO_ARGUS                  = 0xd
+       IPPROTO_AX25                   = 0x5d
+       IPPROTO_BHA                    = 0x31
+       IPPROTO_BLT                    = 0x1e
+       IPPROTO_BRSATMON               = 0x4c
+       IPPROTO_CARP                   = 0x70
+       IPPROTO_CFTP                   = 0x3e
+       IPPROTO_CHAOS                  = 0x10
+       IPPROTO_CMTP                   = 0x26
+       IPPROTO_CPHB                   = 0x49
+       IPPROTO_CPNX                   = 0x48
+       IPPROTO_DCCP                   = 0x21
+       IPPROTO_DDP                    = 0x25
+       IPPROTO_DGP                    = 0x56
+       IPPROTO_DIVERT                 = 0x102
+       IPPROTO_DONE                   = 0x101
+       IPPROTO_DSTOPTS                = 0x3c
+       IPPROTO_EGP                    = 0x8
+       IPPROTO_EMCON                  = 0xe
+       IPPROTO_ENCAP                  = 0x62
+       IPPROTO_EON                    = 0x50
+       IPPROTO_ESP                    = 0x32
+       IPPROTO_ETHERIP                = 0x61
+       IPPROTO_FRAGMENT               = 0x2c
+       IPPROTO_GGP                    = 0x3
+       IPPROTO_GMTP                   = 0x64
+       IPPROTO_GRE                    = 0x2f
+       IPPROTO_HELLO                  = 0x3f
+       IPPROTO_HIP                    = 0x8b
+       IPPROTO_HMP                    = 0x14
+       IPPROTO_HOPOPTS                = 0x0
+       IPPROTO_ICMP                   = 0x1
+       IPPROTO_ICMPV6                 = 0x3a
+       IPPROTO_IDP                    = 0x16
+       IPPROTO_IDPR                   = 0x23
+       IPPROTO_IDRP                   = 0x2d
+       IPPROTO_IGMP                   = 0x2
+       IPPROTO_IGP                    = 0x55
+       IPPROTO_IGRP                   = 0x58
+       IPPROTO_IL                     = 0x28
+       IPPROTO_INLSP                  = 0x34
+       IPPROTO_INP                    = 0x20
+       IPPROTO_IP                     = 0x0
+       IPPROTO_IPCOMP                 = 0x6c
+       IPPROTO_IPCV                   = 0x47
+       IPPROTO_IPEIP                  = 0x5e
+       IPPROTO_IPIP                   = 0x4
+       IPPROTO_IPPC                   = 0x43
+       IPPROTO_IPV4                   = 0x4
+       IPPROTO_IPV6                   = 0x29
+       IPPROTO_IRTP                   = 0x1c
+       IPPROTO_KRYPTOLAN              = 0x41
+       IPPROTO_LARP                   = 0x5b
+       IPPROTO_LEAF1                  = 0x19
+       IPPROTO_LEAF2                  = 0x1a
+       IPPROTO_MAX                    = 0x100
+       IPPROTO_MEAS                   = 0x13
+       IPPROTO_MH                     = 0x87
+       IPPROTO_MHRP                   = 0x30
+       IPPROTO_MICP                   = 0x5f
+       IPPROTO_MOBILE                 = 0x37
+       IPPROTO_MPLS                   = 0x89
+       IPPROTO_MTP                    = 0x5c
+       IPPROTO_MUX                    = 0x12
+       IPPROTO_ND                     = 0x4d
+       IPPROTO_NHRP                   = 0x36
+       IPPROTO_NONE                   = 0x3b
+       IPPROTO_NSP                    = 0x1f
+       IPPROTO_NVPII                  = 0xb
+       IPPROTO_OLD_DIVERT             = 0xfe
+       IPPROTO_OSPFIGP                = 0x59
+       IPPROTO_PFSYNC                 = 0xf0
+       IPPROTO_PGM                    = 0x71
+       IPPROTO_PIGP                   = 0x9
+       IPPROTO_PIM                    = 0x67
+       IPPROTO_PRM                    = 0x15
+       IPPROTO_PUP                    = 0xc
+       IPPROTO_PVP                    = 0x4b
+       IPPROTO_RAW                    = 0xff
+       IPPROTO_RCCMON                 = 0xa
+       IPPROTO_RDP                    = 0x1b
+       IPPROTO_RESERVED_253           = 0xfd
+       IPPROTO_RESERVED_254           = 0xfe
+       IPPROTO_ROUTING                = 0x2b
+       IPPROTO_RSVP                   = 0x2e
+       IPPROTO_RVD                    = 0x42
+       IPPROTO_SATEXPAK               = 0x40
+       IPPROTO_SATMON                 = 0x45
+       IPPROTO_SCCSP                  = 0x60
+       IPPROTO_SCTP                   = 0x84
+       IPPROTO_SDRP                   = 0x2a
+       IPPROTO_SEND                   = 0x103
+       IPPROTO_SHIM6                  = 0x8c
+       IPPROTO_SKIP                   = 0x39
+       IPPROTO_SPACER                 = 0x7fff
+       IPPROTO_SRPC                   = 0x5a
+       IPPROTO_ST                     = 0x7
+       IPPROTO_SVMTP                  = 0x52
+       IPPROTO_SWIPE                  = 0x35
+       IPPROTO_TCF                    = 0x57
+       IPPROTO_TCP                    = 0x6
+       IPPROTO_TLSP                   = 0x38
+       IPPROTO_TP                     = 0x1d
+       IPPROTO_TPXX                   = 0x27
+       IPPROTO_TRUNK1                 = 0x17
+       IPPROTO_TRUNK2                 = 0x18
+       IPPROTO_TTP                    = 0x54
+       IPPROTO_UDP                    = 0x11
+       IPPROTO_UDPLITE                = 0x88
+       IPPROTO_VINES                  = 0x53
+       IPPROTO_VISA                   = 0x46
+       IPPROTO_VMTP                   = 0x51
+       IPPROTO_WBEXPAK                = 0x4f
+       IPPROTO_WBMON                  = 0x4e
+       IPPROTO_WSN                    = 0x4a
+       IPPROTO_XNET                   = 0xf
+       IPPROTO_XTP                    = 0x24
+       IPV6_AUTOFLOWLABEL             = 0x3b
+       IPV6_BINDANY                   = 0x40
+       IPV6_BINDMULTI                 = 0x41
+       IPV6_BINDV6ONLY                = 0x1b
+       IPV6_CHECKSUM                  = 0x1a
+       IPV6_DEFAULT_MULTICAST_HOPS    = 0x1
+       IPV6_DEFAULT_MULTICAST_LOOP    = 0x1
+       IPV6_DEFHLIM                   = 0x40
+       IPV6_DONTFRAG                  = 0x3e
+       IPV6_DSTOPTS                   = 0x32
+       IPV6_FLOWID                    = 0x43
+       IPV6_FLOWINFO_MASK             = 0xffffff0f
+       IPV6_FLOWLABEL_LEN             = 0x14
+       IPV6_FLOWLABEL_MASK            = 0xffff0f00
+       IPV6_FLOWTYPE                  = 0x44
+       IPV6_FRAGTTL                   = 0x78
+       IPV6_FW_ADD                    = 0x1e
+       IPV6_FW_DEL                    = 0x1f
+       IPV6_FW_FLUSH                  = 0x20
+       IPV6_FW_GET                    = 0x22
+       IPV6_FW_ZERO                   = 0x21
+       IPV6_HLIMDEC                   = 0x1
+       IPV6_HOPLIMIT                  = 0x2f
+       IPV6_HOPOPTS                   = 0x31
+       IPV6_IPSEC_POLICY              = 0x1c
+       IPV6_JOIN_GROUP                = 0xc
+       IPV6_LEAVE_GROUP               = 0xd
+       IPV6_MAXHLIM                   = 0xff
+       IPV6_MAXOPTHDR                 = 0x800
+       IPV6_MAXPACKET                 = 0xffff
+       IPV6_MAX_GROUP_SRC_FILTER      = 0x200
+       IPV6_MAX_MEMBERSHIPS           = 0xfff
+       IPV6_MAX_SOCK_SRC_FILTER       = 0x80
+       IPV6_MMTU                      = 0x500
+       IPV6_MSFILTER                  = 0x4a
+       IPV6_MULTICAST_HOPS            = 0xa
+       IPV6_MULTICAST_IF              = 0x9
+       IPV6_MULTICAST_LOOP            = 0xb
+       IPV6_NEXTHOP                   = 0x30
+       IPV6_ORIGDSTADDR               = 0x48
+       IPV6_PATHMTU                   = 0x2c
+       IPV6_PKTINFO                   = 0x2e
+       IPV6_PORTRANGE                 = 0xe
+       IPV6_PORTRANGE_DEFAULT         = 0x0
+       IPV6_PORTRANGE_HIGH            = 0x1
+       IPV6_PORTRANGE_LOW             = 0x2
+       IPV6_PREFER_TEMPADDR           = 0x3f
+       IPV6_RECVDSTOPTS               = 0x28
+       IPV6_RECVFLOWID                = 0x46
+       IPV6_RECVHOPLIMIT              = 0x25
+       IPV6_RECVHOPOPTS               = 0x27
+       IPV6_RECVORIGDSTADDR           = 0x48
+       IPV6_RECVPATHMTU               = 0x2b
+       IPV6_RECVPKTINFO               = 0x24
+       IPV6_RECVRSSBUCKETID           = 0x47
+       IPV6_RECVRTHDR                 = 0x26
+       IPV6_RECVTCLASS                = 0x39
+       IPV6_RSSBUCKETID               = 0x45
+       IPV6_RSS_LISTEN_BUCKET         = 0x42
+       IPV6_RTHDR                     = 0x33
+       IPV6_RTHDRDSTOPTS              = 0x23
+       IPV6_RTHDR_LOOSE               = 0x0
+       IPV6_RTHDR_STRICT              = 0x1
+       IPV6_RTHDR_TYPE_0              = 0x0
+       IPV6_SOCKOPT_RESERVED1         = 0x3
+       IPV6_TCLASS                    = 0x3d
+       IPV6_UNICAST_HOPS              = 0x4
+       IPV6_USE_MIN_MTU               = 0x2a
+       IPV6_V6ONLY                    = 0x1b
+       IPV6_VERSION                   = 0x60
+       IPV6_VERSION_MASK              = 0xf0
+       IPV6_VLAN_PCP                  = 0x4b
+       IP_ADD_MEMBERSHIP              = 0xc
+       IP_ADD_SOURCE_MEMBERSHIP       = 0x46
+       IP_BINDANY                     = 0x18
+       IP_BINDMULTI                   = 0x19
+       IP_BLOCK_SOURCE                = 0x48
+       IP_DEFAULT_MULTICAST_LOOP      = 0x1
+       IP_DEFAULT_MULTICAST_TTL       = 0x1
+       IP_DF                          = 0x4000
+       IP_DONTFRAG                    = 0x43
+       IP_DROP_MEMBERSHIP             = 0xd
+       IP_DROP_SOURCE_MEMBERSHIP      = 0x47
+       IP_DUMMYNET3                   = 0x31
+       IP_DUMMYNET_CONFIGURE          = 0x3c
+       IP_DUMMYNET_DEL                = 0x3d
+       IP_DUMMYNET_FLUSH              = 0x3e
+       IP_DUMMYNET_GET                = 0x40
+       IP_FLOWID                      = 0x5a
+       IP_FLOWTYPE                    = 0x5b
+       IP_FW3                         = 0x30
+       IP_FW_ADD                      = 0x32
+       IP_FW_DEL                      = 0x33
+       IP_FW_FLUSH                    = 0x34
+       IP_FW_GET                      = 0x36
+       IP_FW_NAT_CFG                  = 0x38
+       IP_FW_NAT_DEL                  = 0x39
+       IP_FW_NAT_GET_CONFIG           = 0x3a
+       IP_FW_NAT_GET_LOG              = 0x3b
+       IP_FW_RESETLOG                 = 0x37
+       IP_FW_TABLE_ADD                = 0x28
+       IP_FW_TABLE_DEL                = 0x29
+       IP_FW_TABLE_FLUSH              = 0x2a
+       IP_FW_TABLE_GETSIZE            = 0x2b
+       IP_FW_TABLE_LIST               = 0x2c
+       IP_FW_ZERO                     = 0x35
+       IP_HDRINCL                     = 0x2
+       IP_IPSEC_POLICY                = 0x15
+       IP_MAXPACKET                   = 0xffff
+       IP_MAX_GROUP_SRC_FILTER        = 0x200
+       IP_MAX_MEMBERSHIPS             = 0xfff
+       IP_MAX_SOCK_MUTE_FILTER        = 0x80
+       IP_MAX_SOCK_SRC_FILTER         = 0x80
+       IP_MF                          = 0x2000
+       IP_MINTTL                      = 0x42
+       IP_MSFILTER                    = 0x4a
+       IP_MSS                         = 0x240
+       IP_MULTICAST_IF                = 0x9
+       IP_MULTICAST_LOOP              = 0xb
+       IP_MULTICAST_TTL               = 0xa
+       IP_MULTICAST_VIF               = 0xe
+       IP_OFFMASK                     = 0x1fff
+       IP_ONESBCAST                   = 0x17
+       IP_OPTIONS                     = 0x1
+       IP_ORIGDSTADDR                 = 0x1b
+       IP_PORTRANGE                   = 0x13
+       IP_PORTRANGE_DEFAULT           = 0x0
+       IP_PORTRANGE_HIGH              = 0x1
+       IP_PORTRANGE_LOW               = 0x2
+       IP_RECVDSTADDR                 = 0x7
+       IP_RECVFLOWID                  = 0x5d
+       IP_RECVIF                      = 0x14
+       IP_RECVOPTS                    = 0x5
+       IP_RECVORIGDSTADDR             = 0x1b
+       IP_RECVRETOPTS                 = 0x6
+       IP_RECVRSSBUCKETID             = 0x5e
+       IP_RECVTOS                     = 0x44
+       IP_RECVTTL                     = 0x41
+       IP_RETOPTS                     = 0x8
+       IP_RF                          = 0x8000
+       IP_RSSBUCKETID                 = 0x5c
+       IP_RSS_LISTEN_BUCKET           = 0x1a
+       IP_RSVP_OFF                    = 0x10
+       IP_RSVP_ON                     = 0xf
+       IP_RSVP_VIF_OFF                = 0x12
+       IP_RSVP_VIF_ON                 = 0x11
+       IP_SENDSRCADDR                 = 0x7
+       IP_TOS                         = 0x3
+       IP_TTL                         = 0x4
+       IP_UNBLOCK_SOURCE              = 0x49
+       IP_VLAN_PCP                    = 0x4b
+       ISIG                           = 0x80
+       ISTRIP                         = 0x20
+       ITIMER_PROF                    = 0x2
+       ITIMER_REAL                    = 0x0
+       ITIMER_VIRTUAL                 = 0x1
+       IXANY                          = 0x800
+       IXOFF                          = 0x400
+       IXON                           = 0x200
+       KERN_HOSTNAME                  = 0xa
+       KERN_OSRELEASE                 = 0x2
+       KERN_OSTYPE                    = 0x1
+       KERN_VERSION                   = 0x4
+       LOCAL_CONNWAIT                 = 0x4
+       LOCAL_CREDS                    = 0x2
+       LOCAL_CREDS_PERSISTENT         = 0x3
+       LOCAL_PEERCRED                 = 0x1
+       LOCAL_VENDOR                   = 0x80000000
+       LOCK_EX                        = 0x2
+       LOCK_NB                        = 0x4
+       LOCK_SH                        = 0x1
+       LOCK_UN                        = 0x8
+       MADV_AUTOSYNC                  = 0x7
+       MADV_CORE                      = 0x9
+       MADV_DONTNEED                  = 0x4
+       MADV_FREE                      = 0x5
+       MADV_NOCORE                    = 0x8
+       MADV_NORMAL                    = 0x0
+       MADV_NOSYNC                    = 0x6
+       MADV_PROTECT                   = 0xa
+       MADV_RANDOM                    = 0x1
+       MADV_SEQUENTIAL                = 0x2
+       MADV_WILLNEED                  = 0x3
+       MAP_32BIT                      = 0x80000
+       MAP_ALIGNED_SUPER              = 0x1000000
+       MAP_ALIGNMENT_MASK             = -0x1000000
+       MAP_ALIGNMENT_SHIFT            = 0x18
+       MAP_ANON                       = 0x1000
+       MAP_ANONYMOUS                  = 0x1000
+       MAP_COPY                       = 0x2
+       MAP_EXCL                       = 0x4000
+       MAP_FILE                       = 0x0
+       MAP_FIXED                      = 0x10
+       MAP_GUARD                      = 0x2000
+       MAP_HASSEMAPHORE               = 0x200
+       MAP_NOCORE                     = 0x20000
+       MAP_NOSYNC                     = 0x800
+       MAP_PREFAULT_READ              = 0x40000
+       MAP_PRIVATE                    = 0x2
+       MAP_RESERVED0020               = 0x20
+       MAP_RESERVED0040               = 0x40
+       MAP_RESERVED0080               = 0x80
+       MAP_RESERVED0100               = 0x100
+       MAP_SHARED                     = 0x1
+       MAP_STACK                      = 0x400
+       MCAST_BLOCK_SOURCE             = 0x54
+       MCAST_EXCLUDE                  = 0x2
+       MCAST_INCLUDE                  = 0x1
+       MCAST_JOIN_GROUP               = 0x50
+       MCAST_JOIN_SOURCE_GROUP        = 0x52
+       MCAST_LEAVE_GROUP              = 0x51
+       MCAST_LEAVE_SOURCE_GROUP       = 0x53
+       MCAST_UNBLOCK_SOURCE           = 0x55
+       MCAST_UNDEFINED                = 0x0
+       MCL_CURRENT                    = 0x1
+       MCL_FUTURE                     = 0x2
+       MFD_ALLOW_SEALING              = 0x2
+       MFD_CLOEXEC                    = 0x1
+       MFD_HUGETLB                    = 0x4
+       MFD_HUGE_16GB                  = -0x78000000
+       MFD_HUGE_16MB                  = 0x60000000
+       MFD_HUGE_1GB                   = 0x78000000
+       MFD_HUGE_1MB                   = 0x50000000
+       MFD_HUGE_256MB                 = 0x70000000
+       MFD_HUGE_2GB                   = 0x7c000000
+       MFD_HUGE_2MB                   = 0x54000000
+       MFD_HUGE_32MB                  = 0x64000000
+       MFD_HUGE_512KB                 = 0x4c000000
+       MFD_HUGE_512MB                 = 0x74000000
+       MFD_HUGE_64KB                  = 0x40000000
+       MFD_HUGE_8MB                   = 0x5c000000
+       MFD_HUGE_MASK                  = 0xfc000000
+       MFD_HUGE_SHIFT                 = 0x1a
+       MNT_ACLS                       = 0x8000000
+       MNT_ASYNC                      = 0x40
+       MNT_AUTOMOUNTED                = 0x200000000
+       MNT_BYFSID                     = 0x8000000
+       MNT_CMDFLAGS                   = 0x300d0f0000
+       MNT_DEFEXPORTED                = 0x200
+       MNT_DELEXPORT                  = 0x20000
+       MNT_EMPTYDIR                   = 0x2000000000
+       MNT_EXKERB                     = 0x800
+       MNT_EXPORTANON                 = 0x400
+       MNT_EXPORTED                   = 0x100
+       MNT_EXPUBLIC                   = 0x20000000
+       MNT_EXRDONLY                   = 0x80
+       MNT_EXTLS                      = 0x4000000000
+       MNT_EXTLSCERT                  = 0x8000000000
+       MNT_EXTLSCERTUSER              = 0x10000000000
+       MNT_FORCE                      = 0x80000
+       MNT_GJOURNAL                   = 0x2000000
+       MNT_IGNORE                     = 0x800000
+       MNT_LAZY                       = 0x3
+       MNT_LOCAL                      = 0x1000
+       MNT_MULTILABEL                 = 0x4000000
+       MNT_NFS4ACLS                   = 0x10
+       MNT_NOATIME                    = 0x10000000
+       MNT_NOCLUSTERR                 = 0x40000000
+       MNT_NOCLUSTERW                 = 0x80000000
+       MNT_NOCOVER                    = 0x1000000000
+       MNT_NOEXEC                     = 0x4
+       MNT_NONBUSY                    = 0x4000000
+       MNT_NOSUID                     = 0x8
+       MNT_NOSYMFOLLOW                = 0x400000
+       MNT_NOWAIT                     = 0x2
+       MNT_QUOTA                      = 0x2000
+       MNT_RDONLY                     = 0x1
+       MNT_RELOAD                     = 0x40000
+       MNT_ROOTFS                     = 0x4000
+       MNT_SNAPSHOT                   = 0x1000000
+       MNT_SOFTDEP                    = 0x200000
+       MNT_SUIDDIR                    = 0x100000
+       MNT_SUJ                        = 0x100000000
+       MNT_SUSPEND                    = 0x4
+       MNT_SYNCHRONOUS                = 0x2
+       MNT_UNION                      = 0x20
+       MNT_UNTRUSTED                  = 0x800000000
+       MNT_UPDATE                     = 0x10000
+       MNT_UPDATEMASK                 = 0xad8d0807e
+       MNT_USER                       = 0x8000
+       MNT_VERIFIED                   = 0x400000000
+       MNT_VISFLAGMASK                = 0xffef0ffff
+       MNT_WAIT                       = 0x1
+       MSG_CMSG_CLOEXEC               = 0x40000
+       MSG_COMPAT                     = 0x8000
+       MSG_CTRUNC                     = 0x20
+       MSG_DONTROUTE                  = 0x4
+       MSG_DONTWAIT                   = 0x80
+       MSG_EOF                        = 0x100
+       MSG_EOR                        = 0x8
+       MSG_NBIO                       = 0x4000
+       MSG_NOSIGNAL                   = 0x20000
+       MSG_NOTIFICATION               = 0x2000
+       MSG_OOB                        = 0x1
+       MSG_PEEK                       = 0x2
+       MSG_TRUNC                      = 0x10
+       MSG_WAITALL                    = 0x40
+       MSG_WAITFORONE                 = 0x80000
+       MS_ASYNC                       = 0x1
+       MS_INVALIDATE                  = 0x2
+       MS_SYNC                        = 0x0
+       NAME_MAX                       = 0xff
+       NET_RT_DUMP                    = 0x1
+       NET_RT_FLAGS                   = 0x2
+       NET_RT_IFLIST                  = 0x3
+       NET_RT_IFLISTL                 = 0x5
+       NET_RT_IFMALIST                = 0x4
+       NET_RT_NHGRP                   = 0x7
+       NET_RT_NHOP                    = 0x6
+       NFDBITS                        = 0x40
+       NOFLSH                         = 0x80000000
+       NOKERNINFO                     = 0x2000000
+       NOTE_ABSTIME                   = 0x10
+       NOTE_ATTRIB                    = 0x8
+       NOTE_CHILD                     = 0x4
+       NOTE_CLOSE                     = 0x100
+       NOTE_CLOSE_WRITE               = 0x200
+       NOTE_DELETE                    = 0x1
+       NOTE_EXEC                      = 0x20000000
+       NOTE_EXIT                      = 0x80000000
+       NOTE_EXTEND                    = 0x4
+       NOTE_FFAND                     = 0x40000000
+       NOTE_FFCOPY                    = 0xc0000000
+       NOTE_FFCTRLMASK                = 0xc0000000
+       NOTE_FFLAGSMASK                = 0xffffff
+       NOTE_FFNOP                     = 0x0
+       NOTE_FFOR                      = 0x80000000
+       NOTE_FILE_POLL                 = 0x2
+       NOTE_FORK                      = 0x40000000
+       NOTE_LINK                      = 0x10
+       NOTE_LOWAT                     = 0x1
+       NOTE_MSECONDS                  = 0x2
+       NOTE_NSECONDS                  = 0x8
+       NOTE_OPEN                      = 0x80
+       NOTE_PCTRLMASK                 = 0xf0000000
+       NOTE_PDATAMASK                 = 0xfffff
+       NOTE_READ                      = 0x400
+       NOTE_RENAME                    = 0x20
+       NOTE_REVOKE                    = 0x40
+       NOTE_SECONDS                   = 0x1
+       NOTE_TRACK                     = 0x1
+       NOTE_TRACKERR                  = 0x2
+       NOTE_TRIGGER                   = 0x1000000
+       NOTE_USECONDS                  = 0x4
+       NOTE_WRITE                     = 0x2
+       OCRNL                          = 0x10
+       ONLCR                          = 0x2
+       ONLRET                         = 0x40
+       ONOCR                          = 0x20
+       ONOEOT                         = 0x8
+       OPOST                          = 0x1
+       OXTABS                         = 0x4
+       O_ACCMODE                      = 0x3
+       O_APPEND                       = 0x8
+       O_ASYNC                        = 0x40
+       O_CLOEXEC                      = 0x100000
+       O_CREAT                        = 0x200
+       O_DIRECT                       = 0x10000
+       O_DIRECTORY                    = 0x20000
+       O_DSYNC                        = 0x1000000
+       O_EMPTY_PATH                   = 0x2000000
+       O_EXCL                         = 0x800
+       O_EXEC                         = 0x40000
+       O_EXLOCK                       = 0x20
+       O_FSYNC                        = 0x80
+       O_NDELAY                       = 0x4
+       O_NOCTTY                       = 0x8000
+       O_NOFOLLOW                     = 0x100
+       O_NONBLOCK                     = 0x4
+       O_PATH                         = 0x400000
+       O_RDONLY                       = 0x0
+       O_RDWR                         = 0x2
+       O_RESOLVE_BENEATH              = 0x800000
+       O_SEARCH                       = 0x40000
+       O_SHLOCK                       = 0x10
+       O_SYNC                         = 0x80
+       O_TRUNC                        = 0x400
+       O_TTY_INIT                     = 0x80000
+       O_VERIFY                       = 0x200000
+       O_WRONLY                       = 0x1
+       PARENB                         = 0x1000
+       PARMRK                         = 0x8
+       PARODD                         = 0x2000
+       PENDIN                         = 0x20000000
+       PIOD_READ_D                    = 0x1
+       PIOD_READ_I                    = 0x3
+       PIOD_WRITE_D                   = 0x2
+       PIOD_WRITE_I                   = 0x4
+       PRIO_PGRP                      = 0x1
+       PRIO_PROCESS                   = 0x0
+       PRIO_USER                      = 0x2
+       PROT_EXEC                      = 0x4
+       PROT_NONE                      = 0x0
+       PROT_READ                      = 0x1
+       PROT_WRITE                     = 0x2
+       PTRACE_DEFAULT                 = 0x1
+       PTRACE_EXEC                    = 0x1
+       PTRACE_FORK                    = 0x8
+       PTRACE_LWP                     = 0x10
+       PTRACE_SCE                     = 0x2
+       PTRACE_SCX                     = 0x4
+       PTRACE_SYSCALL                 = 0x6
+       PTRACE_VFORK                   = 0x20
+       PT_ATTACH                      = 0xa
+       PT_CLEARSTEP                   = 0x10
+       PT_CONTINUE                    = 0x7
+       PT_COREDUMP                    = 0x1d
+       PT_DETACH                      = 0xb
+       PT_FIRSTMACH                   = 0x40
+       PT_FOLLOW_FORK                 = 0x17
+       PT_GETDBREGS                   = 0x25
+       PT_GETFPREGS                   = 0x23
+       PT_GETLWPLIST                  = 0xf
+       PT_GETNUMLWPS                  = 0xe
+       PT_GETREGS                     = 0x21
+       PT_GET_EVENT_MASK              = 0x19
+       PT_GET_SC_ARGS                 = 0x1b
+       PT_GET_SC_RET                  = 0x1c
+       PT_IO                          = 0xc
+       PT_KILL                        = 0x8
+       PT_LWPINFO                     = 0xd
+       PT_LWP_EVENTS                  = 0x18
+       PT_READ_D                      = 0x2
+       PT_READ_I                      = 0x1
+       PT_RESUME                      = 0x13
+       PT_SETDBREGS                   = 0x26
+       PT_SETFPREGS                   = 0x24
+       PT_SETREGS                     = 0x22
+       PT_SETSTEP                     = 0x11
+       PT_SET_EVENT_MASK              = 0x1a
+       PT_STEP                        = 0x9
+       PT_SUSPEND                     = 0x12
+       PT_SYSCALL                     = 0x16
+       PT_TO_SCE                      = 0x14
+       PT_TO_SCX                      = 0x15
+       PT_TRACE_ME                    = 0x0
+       PT_VM_ENTRY                    = 0x29
+       PT_VM_TIMESTAMP                = 0x28
+       PT_WRITE_D                     = 0x5
+       PT_WRITE_I                     = 0x4
+       P_ZONEID                       = 0xc
+       RLIMIT_AS                      = 0xa
+       RLIMIT_CORE                    = 0x4
+       RLIMIT_CPU                     = 0x0
+       RLIMIT_DATA                    = 0x2
+       RLIMIT_FSIZE                   = 0x1
+       RLIMIT_MEMLOCK                 = 0x6
+       RLIMIT_NOFILE                  = 0x8
+       RLIMIT_NPROC                   = 0x7
+       RLIMIT_RSS                     = 0x5
+       RLIMIT_STACK                   = 0x3
+       RLIM_INFINITY                  = 0x7fffffffffffffff
+       RTAX_AUTHOR                    = 0x6
+       RTAX_BRD                       = 0x7
+       RTAX_DST                       = 0x0
+       RTAX_GATEWAY                   = 0x1
+       RTAX_GENMASK                   = 0x3
+       RTAX_IFA                       = 0x5
+       RTAX_IFP                       = 0x4
+       RTAX_MAX                       = 0x8
+       RTAX_NETMASK                   = 0x2
+       RTA_AUTHOR                     = 0x40
+       RTA_BRD                        = 0x80
+       RTA_DST                        = 0x1
+       RTA_GATEWAY                    = 0x2
+       RTA_GENMASK                    = 0x8
+       RTA_IFA                        = 0x20
+       RTA_IFP                        = 0x10
+       RTA_NETMASK                    = 0x4
+       RTF_BLACKHOLE                  = 0x1000
+       RTF_BROADCAST                  = 0x400000
+       RTF_DONE                       = 0x40
+       RTF_DYNAMIC                    = 0x10
+       RTF_FIXEDMTU                   = 0x80000
+       RTF_FMASK                      = 0x1004d808
+       RTF_GATEWAY                    = 0x2
+       RTF_GWFLAG_COMPAT              = 0x80000000
+       RTF_HOST                       = 0x4
+       RTF_LLDATA                     = 0x400
+       RTF_LLINFO                     = 0x400
+       RTF_LOCAL                      = 0x200000
+       RTF_MODIFIED                   = 0x20
+       RTF_MULTICAST                  = 0x800000
+       RTF_PINNED                     = 0x100000
+       RTF_PROTO1                     = 0x8000
+       RTF_PROTO2                     = 0x4000
+       RTF_PROTO3                     = 0x40000
+       RTF_REJECT                     = 0x8
+       RTF_STATIC                     = 0x800
+       RTF_STICKY                     = 0x10000000
+       RTF_UP                         = 0x1
+       RTF_XRESOLVE                   = 0x200
+       RTM_ADD                        = 0x1
+       RTM_CHANGE                     = 0x3
+       RTM_DELADDR                    = 0xd
+       RTM_DELETE                     = 0x2
+       RTM_DELMADDR                   = 0x10
+       RTM_GET                        = 0x4
+       RTM_IEEE80211                  = 0x12
+       RTM_IFANNOUNCE                 = 0x11
+       RTM_IFINFO                     = 0xe
+       RTM_LOCK                       = 0x8
+       RTM_LOSING                     = 0x5
+       RTM_MISS                       = 0x7
+       RTM_NEWADDR                    = 0xc
+       RTM_NEWMADDR                   = 0xf
+       RTM_REDIRECT                   = 0x6
+       RTM_RESOLVE                    = 0xb
+       RTM_RTTUNIT                    = 0xf4240
+       RTM_VERSION                    = 0x5
+       RTV_EXPIRE                     = 0x4
+       RTV_HOPCOUNT                   = 0x2
+       RTV_MTU                        = 0x1
+       RTV_RPIPE                      = 0x8
+       RTV_RTT                        = 0x40
+       RTV_RTTVAR                     = 0x80
+       RTV_SPIPE                      = 0x10
+       RTV_SSTHRESH                   = 0x20
+       RTV_WEIGHT                     = 0x100
+       RT_ALL_FIBS                    = -0x1
+       RT_BLACKHOLE                   = 0x40
+       RT_DEFAULT_FIB                 = 0x0
+       RT_DEFAULT_WEIGHT              = 0x1
+       RT_HAS_GW                      = 0x80
+       RT_HAS_HEADER                  = 0x10
+       RT_HAS_HEADER_BIT              = 0x4
+       RT_L2_ME                       = 0x4
+       RT_L2_ME_BIT                   = 0x2
+       RT_LLE_CACHE                   = 0x100
+       RT_MAX_WEIGHT                  = 0xffffff
+       RT_MAY_LOOP                    = 0x8
+       RT_MAY_LOOP_BIT                = 0x3
+       RT_REJECT                      = 0x20
+       RUSAGE_CHILDREN                = -0x1
+       RUSAGE_SELF                    = 0x0
+       RUSAGE_THREAD                  = 0x1
+       SCM_BINTIME                    = 0x4
+       SCM_CREDS                      = 0x3
+       SCM_CREDS2                     = 0x8
+       SCM_MONOTONIC                  = 0x6
+       SCM_REALTIME                   = 0x5
+       SCM_RIGHTS                     = 0x1
+       SCM_TIMESTAMP                  = 0x2
+       SCM_TIME_INFO                  = 0x7
+       SEEK_CUR                       = 0x1
+       SEEK_DATA                      = 0x3
+       SEEK_END                       = 0x2
+       SEEK_HOLE                      = 0x4
+       SEEK_SET                       = 0x0
+       SHUT_RD                        = 0x0
+       SHUT_RDWR                      = 0x2
+       SHUT_WR                        = 0x1
+       SIOCADDMULTI                   = 0x80206931
+       SIOCAIFADDR                    = 0x8040691a
+       SIOCAIFGROUP                   = 0x80286987
+       SIOCATMARK                     = 0x40047307
+       SIOCDELMULTI                   = 0x80206932
+       SIOCDIFADDR                    = 0x80206919
+       SIOCDIFGROUP                   = 0x80286989
+       SIOCDIFPHYADDR                 = 0x80206949
+       SIOCGDRVSPEC                   = 0xc028697b
+       SIOCGETSGCNT                   = 0xc0207210
+       SIOCGETVIFCNT                  = 0xc028720f
+       SIOCGHIWAT                     = 0x40047301
+       SIOCGHWADDR                    = 0xc020693e
+       SIOCGI2C                       = 0xc020693d
+       SIOCGIFADDR                    = 0xc0206921
+       SIOCGIFALIAS                   = 0xc044692d
+       SIOCGIFBRDADDR                 = 0xc0206923
+       SIOCGIFCAP                     = 0xc020691f
+       SIOCGIFCONF                    = 0xc0106924
+       SIOCGIFDATA                    = 0x8020692c
+       SIOCGIFDESCR                   = 0xc020692a
+       SIOCGIFDOWNREASON              = 0xc058699a
+       SIOCGIFDSTADDR                 = 0xc0206922
+       SIOCGIFFIB                     = 0xc020695c
+       SIOCGIFFLAGS                   = 0xc0206911
+       SIOCGIFGENERIC                 = 0xc020693a
+       SIOCGIFGMEMB                   = 0xc028698a
+       SIOCGIFGROUP                   = 0xc0286988
+       SIOCGIFINDEX                   = 0xc0206920
+       SIOCGIFMAC                     = 0xc0206926
+       SIOCGIFMEDIA                   = 0xc0306938
+       SIOCGIFMETRIC                  = 0xc0206917
+       SIOCGIFMTU                     = 0xc0206933
+       SIOCGIFNETMASK                 = 0xc0206925
+       SIOCGIFPDSTADDR                = 0xc0206948
+       SIOCGIFPHYS                    = 0xc0206935
+       SIOCGIFPSRCADDR                = 0xc0206947
+       SIOCGIFRSSHASH                 = 0xc0186997
+       SIOCGIFRSSKEY                  = 0xc0946996
+       SIOCGIFSTATUS                  = 0xc331693b
+       SIOCGIFXMEDIA                  = 0xc030698b
+       SIOCGLANPCP                    = 0xc0206998
+       SIOCGLOWAT                     = 0x40047303
+       SIOCGPGRP                      = 0x40047309
+       SIOCGPRIVATE_0                 = 0xc0206950
+       SIOCGPRIVATE_1                 = 0xc0206951
+       SIOCGTUNFIB                    = 0xc020695e
+       SIOCIFCREATE                   = 0xc020697a
+       SIOCIFCREATE2                  = 0xc020697c
+       SIOCIFDESTROY                  = 0x80206979
+       SIOCIFGCLONERS                 = 0xc0106978
+       SIOCSDRVSPEC                   = 0x8028697b
+       SIOCSHIWAT                     = 0x80047300
+       SIOCSIFADDR                    = 0x8020690c
+       SIOCSIFBRDADDR                 = 0x80206913
+       SIOCSIFCAP                     = 0x8020691e
+       SIOCSIFDESCR                   = 0x80206929
+       SIOCSIFDSTADDR                 = 0x8020690e
+       SIOCSIFFIB                     = 0x8020695d
+       SIOCSIFFLAGS                   = 0x80206910
+       SIOCSIFGENERIC                 = 0x80206939
+       SIOCSIFLLADDR                  = 0x8020693c
+       SIOCSIFMAC                     = 0x80206927
+       SIOCSIFMEDIA                   = 0xc0206937
+       SIOCSIFMETRIC                  = 0x80206918
+       SIOCSIFMTU                     = 0x80206934
+       SIOCSIFNAME                    = 0x80206928
+       SIOCSIFNETMASK                 = 0x80206916
+       SIOCSIFPHYADDR                 = 0x80406946
+       SIOCSIFPHYS                    = 0x80206936
+       SIOCSIFRVNET                   = 0xc020695b
+       SIOCSIFVNET                    = 0xc020695a
+       SIOCSLANPCP                    = 0x80206999
+       SIOCSLOWAT                     = 0x80047302
+       SIOCSPGRP                      = 0x80047308
+       SIOCSTUNFIB                    = 0x8020695f
+       SOCK_CLOEXEC                   = 0x10000000
+       SOCK_DGRAM                     = 0x2
+       SOCK_MAXADDRLEN                = 0xff
+       SOCK_NONBLOCK                  = 0x20000000
+       SOCK_RAW                       = 0x3
+       SOCK_RDM                       = 0x4
+       SOCK_SEQPACKET                 = 0x5
+       SOCK_STREAM                    = 0x1
+       SOL_LOCAL                      = 0x0
+       SOL_SOCKET                     = 0xffff
+       SOMAXCONN                      = 0x80
+       SO_ACCEPTCONN                  = 0x2
+       SO_ACCEPTFILTER                = 0x1000
+       SO_BINTIME                     = 0x2000
+       SO_BROADCAST                   = 0x20
+       SO_DEBUG                       = 0x1
+       SO_DOMAIN                      = 0x1019
+       SO_DONTROUTE                   = 0x10
+       SO_ERROR                       = 0x1007
+       SO_KEEPALIVE                   = 0x8
+       SO_LABEL                       = 0x1009
+       SO_LINGER                      = 0x80
+       SO_LISTENINCQLEN               = 0x1013
+       SO_LISTENQLEN                  = 0x1012
+       SO_LISTENQLIMIT                = 0x1011
+       SO_MAX_PACING_RATE             = 0x1018
+       SO_NOSIGPIPE                   = 0x800
+       SO_NO_DDP                      = 0x8000
+       SO_NO_OFFLOAD                  = 0x4000
+       SO_OOBINLINE                   = 0x100
+       SO_PEERLABEL                   = 0x1010
+       SO_PROTOCOL                    = 0x1016
+       SO_PROTOTYPE                   = 0x1016
+       SO_RCVBUF                      = 0x1002
+       SO_RCVLOWAT                    = 0x1004
+       SO_RCVTIMEO                    = 0x1006
+       SO_RERROR                      = 0x20000
+       SO_REUSEADDR                   = 0x4
+       SO_REUSEPORT                   = 0x200
+       SO_REUSEPORT_LB                = 0x10000
+       SO_SETFIB                      = 0x1014
+       SO_SNDBUF                      = 0x1001
+       SO_SNDLOWAT                    = 0x1003
+       SO_SNDTIMEO                    = 0x1005
+       SO_TIMESTAMP                   = 0x400
+       SO_TS_BINTIME                  = 0x1
+       SO_TS_CLOCK                    = 0x1017
+       SO_TS_CLOCK_MAX                = 0x3
+       SO_TS_DEFAULT                  = 0x0
+       SO_TS_MONOTONIC                = 0x3
+       SO_TS_REALTIME                 = 0x2
+       SO_TS_REALTIME_MICRO           = 0x0
+       SO_TYPE                        = 0x1008
+       SO_USELOOPBACK                 = 0x40
+       SO_USER_COOKIE                 = 0x1015
+       SO_VENDOR                      = 0x80000000
+       S_BLKSIZE                      = 0x200
+       S_IEXEC                        = 0x40
+       S_IFBLK                        = 0x6000
+       S_IFCHR                        = 0x2000
+       S_IFDIR                        = 0x4000
+       S_IFIFO                        = 0x1000
+       S_IFLNK                        = 0xa000
+       S_IFMT                         = 0xf000
+       S_IFREG                        = 0x8000
+       S_IFSOCK                       = 0xc000
+       S_IFWHT                        = 0xe000
+       S_IREAD                        = 0x100
+       S_IRGRP                        = 0x20
+       S_IROTH                        = 0x4
+       S_IRUSR                        = 0x100
+       S_IRWXG                        = 0x38
+       S_IRWXO                        = 0x7
+       S_IRWXU                        = 0x1c0
+       S_ISGID                        = 0x400
+       S_ISTXT                        = 0x200
+       S_ISUID                        = 0x800
+       S_ISVTX                        = 0x200
+       S_IWGRP                        = 0x10
+       S_IWOTH                        = 0x2
+       S_IWRITE                       = 0x80
+       S_IWUSR                        = 0x80
+       S_IXGRP                        = 0x8
+       S_IXOTH                        = 0x1
+       S_IXUSR                        = 0x40
+       TAB0                           = 0x0
+       TAB3                           = 0x4
+       TABDLY                         = 0x4
+       TCIFLUSH                       = 0x1
+       TCIOFF                         = 0x3
+       TCIOFLUSH                      = 0x3
+       TCION                          = 0x4
+       TCOFLUSH                       = 0x2
+       TCOOFF                         = 0x1
+       TCOON                          = 0x2
+       TCPOPT_EOL                     = 0x0
+       TCPOPT_FAST_OPEN               = 0x22
+       TCPOPT_MAXSEG                  = 0x2
+       TCPOPT_NOP                     = 0x1
+       TCPOPT_PAD                     = 0x0
+       TCPOPT_SACK                    = 0x5
+       TCPOPT_SACK_PERMITTED          = 0x4
+       TCPOPT_SIGNATURE               = 0x13
+       TCPOPT_TIMESTAMP               = 0x8
+       TCPOPT_WINDOW                  = 0x3
+       TCP_BBR_ACK_COMP_ALG           = 0x448
+       TCP_BBR_ALGORITHM              = 0x43b
+       TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
+       TCP_BBR_DRAIN_PG               = 0x42e
+       TCP_BBR_EXTRA_GAIN             = 0x449
+       TCP_BBR_EXTRA_STATE            = 0x453
+       TCP_BBR_FLOOR_MIN_TSO          = 0x454
+       TCP_BBR_HDWR_PACE              = 0x451
+       TCP_BBR_HOLD_TARGET            = 0x436
+       TCP_BBR_IWINTSO                = 0x42b
+       TCP_BBR_LOWGAIN_FD             = 0x436
+       TCP_BBR_LOWGAIN_HALF           = 0x435
+       TCP_BBR_LOWGAIN_THRESH         = 0x434
+       TCP_BBR_MAX_RTO                = 0x439
+       TCP_BBR_MIN_RTO                = 0x438
+       TCP_BBR_MIN_TOPACEOUT          = 0x455
+       TCP_BBR_ONE_RETRAN             = 0x431
+       TCP_BBR_PACE_CROSS             = 0x442
+       TCP_BBR_PACE_DEL_TAR           = 0x43f
+       TCP_BBR_PACE_OH                = 0x435
+       TCP_BBR_PACE_PER_SEC           = 0x43e
+       TCP_BBR_PACE_SEG_MAX           = 0x440
+       TCP_BBR_PACE_SEG_MIN           = 0x441
+       TCP_BBR_POLICER_DETECT         = 0x457
+       TCP_BBR_PROBE_RTT_GAIN         = 0x44d
+       TCP_BBR_PROBE_RTT_INT          = 0x430
+       TCP_BBR_PROBE_RTT_LEN          = 0x44e
+       TCP_BBR_RACK_INIT_RATE         = 0x458
+       TCP_BBR_RACK_RTT_USE           = 0x44a
+       TCP_BBR_RECFORCE               = 0x42c
+       TCP_BBR_REC_OVER_HPTS          = 0x43a
+       TCP_BBR_RETRAN_WTSO            = 0x44b
+       TCP_BBR_RWND_IS_APP            = 0x42f
+       TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
+       TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
+       TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
+       TCP_BBR_STARTUP_PG             = 0x42d
+       TCP_BBR_TMR_PACE_OH            = 0x448
+       TCP_BBR_TSLIMITS               = 0x434
+       TCP_BBR_TSTMP_RAISES           = 0x456
+       TCP_BBR_UNLIMITED              = 0x43b
+       TCP_BBR_USEDEL_RATE            = 0x437
+       TCP_BBR_USE_LOWGAIN            = 0x433
+       TCP_BBR_USE_RACK_CHEAT         = 0x450
+       TCP_BBR_USE_RACK_RR            = 0x450
+       TCP_BBR_UTTER_MAX_TSO          = 0x452
+       TCP_CA_NAME_MAX                = 0x10
+       TCP_CCALGOOPT                  = 0x41
+       TCP_CONGESTION                 = 0x40
+       TCP_DATA_AFTER_CLOSE           = 0x44c
+       TCP_DEFER_OPTIONS              = 0x470
+       TCP_DELACK                     = 0x48
+       TCP_FASTOPEN                   = 0x401
+       TCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10
+       TCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4
+       TCP_FASTOPEN_PSK_LEN           = 0x10
+       TCP_FAST_RSM_HACK              = 0x471
+       TCP_FIN_IS_RST                 = 0x49
+       TCP_FUNCTION_BLK               = 0x2000
+       TCP_FUNCTION_NAME_LEN_MAX      = 0x20
+       TCP_HDWR_RATE_CAP              = 0x46a
+       TCP_HDWR_UP_ONLY               = 0x46c
+       TCP_IDLE_REDUCE                = 0x46
+       TCP_INFO                       = 0x20
+       TCP_IWND_NB                    = 0x2b
+       TCP_IWND_NSEG                  = 0x2c
+       TCP_KEEPCNT                    = 0x400
+       TCP_KEEPIDLE                   = 0x100
+       TCP_KEEPINIT                   = 0x80
+       TCP_KEEPINTVL                  = 0x200
+       TCP_LOG                        = 0x22
+       TCP_LOGBUF                     = 0x23
+       TCP_LOGDUMP                    = 0x25
+       TCP_LOGDUMPID                  = 0x26
+       TCP_LOGID                      = 0x24
+       TCP_LOGID_CNT                  = 0x2e
+       TCP_LOG_ID_LEN                 = 0x40
+       TCP_LOG_LIMIT                  = 0x4a
+       TCP_LOG_TAG                    = 0x2f
+       TCP_MAXBURST                   = 0x4
+       TCP_MAXHLEN                    = 0x3c
+       TCP_MAXOLEN                    = 0x28
+       TCP_MAXPEAKRATE                = 0x45
+       TCP_MAXSEG                     = 0x2
+       TCP_MAXUNACKTIME               = 0x44
+       TCP_MAXWIN                     = 0xffff
+       TCP_MAX_SACK                   = 0x4
+       TCP_MAX_WINSHIFT               = 0xe
+       TCP_MD5SIG                     = 0x10
+       TCP_MINMSS                     = 0xd8
+       TCP_MSS                        = 0x218
+       TCP_NODELAY                    = 0x1
+       TCP_NOOPT                      = 0x8
+       TCP_NOPUSH                     = 0x4
+       TCP_NO_PRR                     = 0x462
+       TCP_PACING_RATE_CAP            = 0x46b
+       TCP_PCAP_IN                    = 0x1000
+       TCP_PCAP_OUT                   = 0x800
+       TCP_PERF_INFO                  = 0x4e
+       TCP_PROC_ACCOUNTING            = 0x4c
+       TCP_RACK_ABC_VAL               = 0x46d
+       TCP_RACK_CHEAT_NOT_CONF_RATE   = 0x459
+       TCP_RACK_DO_DETECTION          = 0x449
+       TCP_RACK_EARLY_RECOV           = 0x423
+       TCP_RACK_EARLY_SEG             = 0x424
+       TCP_RACK_FORCE_MSEG            = 0x45d
+       TCP_RACK_GP_INCREASE           = 0x446
+       TCP_RACK_GP_INCREASE_CA        = 0x45a
+       TCP_RACK_GP_INCREASE_REC       = 0x45c
+       TCP_RACK_GP_INCREASE_SS        = 0x45b
+       TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
+       TCP_RACK_MBUF_QUEUE            = 0x41a
+       TCP_RACK_MEASURE_CNT           = 0x46f
+       TCP_RACK_MIN_PACE              = 0x445
+       TCP_RACK_MIN_PACE_SEG          = 0x446
+       TCP_RACK_MIN_TO                = 0x422
+       TCP_RACK_NONRXT_CFG_RATE       = 0x463
+       TCP_RACK_NO_PUSH_AT_MAX        = 0x466
+       TCP_RACK_PACE_ALWAYS           = 0x41f
+       TCP_RACK_PACE_MAX_SEG          = 0x41e
+       TCP_RACK_PACE_RATE_CA          = 0x45e
+       TCP_RACK_PACE_RATE_REC         = 0x460
+       TCP_RACK_PACE_RATE_SS          = 0x45f
+       TCP_RACK_PACE_REDUCE           = 0x41d
+       TCP_RACK_PACE_TO_FILL          = 0x467
+       TCP_RACK_PACING_BETA           = 0x472
+       TCP_RACK_PACING_BETA_ECN       = 0x473
+       TCP_RACK_PKT_DELAY             = 0x428
+       TCP_RACK_PROFILE               = 0x469
+       TCP_RACK_PROP                  = 0x41b
+       TCP_RACK_PROP_RATE             = 0x420
+       TCP_RACK_PRR_SENDALOT          = 0x421
+       TCP_RACK_REORD_FADE            = 0x426
+       TCP_RACK_REORD_THRESH          = 0x425
+       TCP_RACK_RR_CONF               = 0x459
+       TCP_RACK_TIMER_SLOP            = 0x474
+       TCP_RACK_TLP_INC_VAR           = 0x429
+       TCP_RACK_TLP_REDUCE            = 0x41c
+       TCP_RACK_TLP_THRESH            = 0x427
+       TCP_RACK_TLP_USE               = 0x447
+       TCP_REC_ABC_VAL                = 0x46e
+       TCP_REMOTE_UDP_ENCAPS_PORT     = 0x47
+       TCP_REUSPORT_LB_NUMA           = 0x402
+       TCP_REUSPORT_LB_NUMA_CURDOM    = -0x1
+       TCP_REUSPORT_LB_NUMA_NODOM     = -0x2
+       TCP_RXTLS_ENABLE               = 0x29
+       TCP_RXTLS_MODE                 = 0x2a
+       TCP_SHARED_CWND_ALLOWED        = 0x4b
+       TCP_SHARED_CWND_ENABLE         = 0x464
+       TCP_SHARED_CWND_TIME_LIMIT     = 0x468
+       TCP_STATS                      = 0x21
+       TCP_TIMELY_DYN_ADJ             = 0x465
+       TCP_TLS_MODE_IFNET             = 0x2
+       TCP_TLS_MODE_NONE              = 0x0
+       TCP_TLS_MODE_SW                = 0x1
+       TCP_TLS_MODE_TOE               = 0x3
+       TCP_TXTLS_ENABLE               = 0x27
+       TCP_TXTLS_MODE                 = 0x28
+       TCP_USER_LOG                   = 0x30
+       TCP_USE_CMP_ACKS               = 0x4d
+       TCP_VENDOR                     = 0x80000000
+       TCSAFLUSH                      = 0x2
+       TIMER_ABSTIME                  = 0x1
+       TIMER_RELTIME                  = 0x0
+       TIOCCBRK                       = 0x2000747a
+       TIOCCDTR                       = 0x20007478
+       TIOCCONS                       = 0x80047462
+       TIOCDRAIN                      = 0x2000745e
+       TIOCEXCL                       = 0x2000740d
+       TIOCEXT                        = 0x80047460
+       TIOCFLUSH                      = 0x80047410
+       TIOCGDRAINWAIT                 = 0x40047456
+       TIOCGETA                       = 0x402c7413
+       TIOCGETD                       = 0x4004741a
+       TIOCGPGRP                      = 0x40047477
+       TIOCGPTN                       = 0x4004740f
+       TIOCGSID                       = 0x40047463
+       TIOCGWINSZ                     = 0x40087468
+       TIOCMBIC                       = 0x8004746b
+       TIOCMBIS                       = 0x8004746c
+       TIOCMGDTRWAIT                  = 0x4004745a
+       TIOCMGET                       = 0x4004746a
+       TIOCMSDTRWAIT                  = 0x8004745b
+       TIOCMSET                       = 0x8004746d
+       TIOCM_CAR                      = 0x40
+       TIOCM_CD                       = 0x40
+       TIOCM_CTS                      = 0x20
+       TIOCM_DCD                      = 0x40
+       TIOCM_DSR                      = 0x100
+       TIOCM_DTR                      = 0x2
+       TIOCM_LE                       = 0x1
+       TIOCM_RI                       = 0x80
+       TIOCM_RNG                      = 0x80
+       TIOCM_RTS                      = 0x4
+       TIOCM_SR                       = 0x10
+       TIOCM_ST                       = 0x8
+       TIOCNOTTY                      = 0x20007471
+       TIOCNXCL                       = 0x2000740e
+       TIOCOUTQ                       = 0x40047473
+       TIOCPKT                        = 0x80047470
+       TIOCPKT_DATA                   = 0x0
+       TIOCPKT_DOSTOP                 = 0x20
+       TIOCPKT_FLUSHREAD              = 0x1
+       TIOCPKT_FLUSHWRITE             = 0x2
+       TIOCPKT_IOCTL                  = 0x40
+       TIOCPKT_NOSTOP                 = 0x10
+       TIOCPKT_START                  = 0x8
+       TIOCPKT_STOP                   = 0x4
+       TIOCPTMASTER                   = 0x2000741c
+       TIOCSBRK                       = 0x2000747b
+       TIOCSCTTY                      = 0x20007461
+       TIOCSDRAINWAIT                 = 0x80047457
+       TIOCSDTR                       = 0x20007479
+       TIOCSETA                       = 0x802c7414
+       TIOCSETAF                      = 0x802c7416
+       TIOCSETAW                      = 0x802c7415
+       TIOCSETD                       = 0x8004741b
+       TIOCSIG                        = 0x2004745f
+       TIOCSPGRP                      = 0x80047476
+       TIOCSTART                      = 0x2000746e
+       TIOCSTAT                       = 0x20007465
+       TIOCSTI                        = 0x80017472
+       TIOCSTOP                       = 0x2000746f
+       TIOCSWINSZ                     = 0x80087467
+       TIOCTIMESTAMP                  = 0x40107459
+       TIOCUCNTL                      = 0x80047466
+       TOSTOP                         = 0x400000
+       UTIME_NOW                      = -0x1
+       UTIME_OMIT                     = -0x2
+       VDISCARD                       = 0xf
+       VDSUSP                         = 0xb
+       VEOF                           = 0x0
+       VEOL                           = 0x1
+       VEOL2                          = 0x2
+       VERASE                         = 0x3
+       VERASE2                        = 0x7
+       VINTR                          = 0x8
+       VKILL                          = 0x5
+       VLNEXT                         = 0xe
+       VMIN                           = 0x10
+       VQUIT                          = 0x9
+       VREPRINT                       = 0x6
+       VSTART                         = 0xc
+       VSTATUS                        = 0x12
+       VSTOP                          = 0xd
+       VSUSP                          = 0xa
+       VTIME                          = 0x11
+       VWERASE                        = 0x4
+       WCONTINUED                     = 0x4
+       WCOREFLAG                      = 0x80
+       WEXITED                        = 0x10
+       WLINUXCLONE                    = 0x80000000
+       WNOHANG                        = 0x1
+       WNOWAIT                        = 0x8
+       WSTOPPED                       = 0x2
+       WTRAPPED                       = 0x20
+       WUNTRACED                      = 0x2
+)
+
+// Errors
+const (
+       E2BIG           = syscall.Errno(0x7)
+       EACCES          = syscall.Errno(0xd)
+       EADDRINUSE      = syscall.Errno(0x30)
+       EADDRNOTAVAIL   = syscall.Errno(0x31)
+       EAFNOSUPPORT    = syscall.Errno(0x2f)
+       EAGAIN          = syscall.Errno(0x23)
+       EALREADY        = syscall.Errno(0x25)
+       EAUTH           = syscall.Errno(0x50)
+       EBADF           = syscall.Errno(0x9)
+       EBADMSG         = syscall.Errno(0x59)
+       EBADRPC         = syscall.Errno(0x48)
+       EBUSY           = syscall.Errno(0x10)
+       ECANCELED       = syscall.Errno(0x55)
+       ECAPMODE        = syscall.Errno(0x5e)
+       ECHILD          = syscall.Errno(0xa)
+       ECONNABORTED    = syscall.Errno(0x35)
+       ECONNREFUSED    = syscall.Errno(0x3d)
+       ECONNRESET      = syscall.Errno(0x36)
+       EDEADLK         = syscall.Errno(0xb)
+       EDESTADDRREQ    = syscall.Errno(0x27)
+       EDOM            = syscall.Errno(0x21)
+       EDOOFUS         = syscall.Errno(0x58)
+       EDQUOT          = syscall.Errno(0x45)
+       EEXIST          = syscall.Errno(0x11)
+       EFAULT          = syscall.Errno(0xe)
+       EFBIG           = syscall.Errno(0x1b)
+       EFTYPE          = syscall.Errno(0x4f)
+       EHOSTDOWN       = syscall.Errno(0x40)
+       EHOSTUNREACH    = syscall.Errno(0x41)
+       EIDRM           = syscall.Errno(0x52)
+       EILSEQ          = syscall.Errno(0x56)
+       EINPROGRESS     = syscall.Errno(0x24)
+       EINTEGRITY      = syscall.Errno(0x61)
+       EINTR           = syscall.Errno(0x4)
+       EINVAL          = syscall.Errno(0x16)
+       EIO             = syscall.Errno(0x5)
+       EISCONN         = syscall.Errno(0x38)
+       EISDIR          = syscall.Errno(0x15)
+       ELAST           = syscall.Errno(0x61)
+       ELOOP           = syscall.Errno(0x3e)
+       EMFILE          = syscall.Errno(0x18)
+       EMLINK          = syscall.Errno(0x1f)
+       EMSGSIZE        = syscall.Errno(0x28)
+       EMULTIHOP       = syscall.Errno(0x5a)
+       ENAMETOOLONG    = syscall.Errno(0x3f)
+       ENEEDAUTH       = syscall.Errno(0x51)
+       ENETDOWN        = syscall.Errno(0x32)
+       ENETRESET       = syscall.Errno(0x34)
+       ENETUNREACH     = syscall.Errno(0x33)
+       ENFILE          = syscall.Errno(0x17)
+       ENOATTR         = syscall.Errno(0x57)
+       ENOBUFS         = syscall.Errno(0x37)
+       ENODEV          = syscall.Errno(0x13)
+       ENOENT          = syscall.Errno(0x2)
+       ENOEXEC         = syscall.Errno(0x8)
+       ENOLCK          = syscall.Errno(0x4d)
+       ENOLINK         = syscall.Errno(0x5b)
+       ENOMEM          = syscall.Errno(0xc)
+       ENOMSG          = syscall.Errno(0x53)
+       ENOPROTOOPT     = syscall.Errno(0x2a)
+       ENOSPC          = syscall.Errno(0x1c)
+       ENOSYS          = syscall.Errno(0x4e)
+       ENOTBLK         = syscall.Errno(0xf)
+       ENOTCAPABLE     = syscall.Errno(0x5d)
+       ENOTCONN        = syscall.Errno(0x39)
+       ENOTDIR         = syscall.Errno(0x14)
+       ENOTEMPTY       = syscall.Errno(0x42)
+       ENOTRECOVERABLE = syscall.Errno(0x5f)
+       ENOTSOCK        = syscall.Errno(0x26)
+       ENOTSUP         = syscall.Errno(0x2d)
+       ENOTTY          = syscall.Errno(0x19)
+       ENXIO           = syscall.Errno(0x6)
+       EOPNOTSUPP      = syscall.Errno(0x2d)
+       EOVERFLOW       = syscall.Errno(0x54)
+       EOWNERDEAD      = syscall.Errno(0x60)
+       EPERM           = syscall.Errno(0x1)
+       EPFNOSUPPORT    = syscall.Errno(0x2e)
+       EPIPE           = syscall.Errno(0x20)
+       EPROCLIM        = syscall.Errno(0x43)
+       EPROCUNAVAIL    = syscall.Errno(0x4c)
+       EPROGMISMATCH   = syscall.Errno(0x4b)
+       EPROGUNAVAIL    = syscall.Errno(0x4a)
+       EPROTO          = syscall.Errno(0x5c)
+       EPROTONOSUPPORT = syscall.Errno(0x2b)
+       EPROTOTYPE      = syscall.Errno(0x29)
+       ERANGE          = syscall.Errno(0x22)
+       EREMOTE         = syscall.Errno(0x47)
+       EROFS           = syscall.Errno(0x1e)
+       ERPCMISMATCH    = syscall.Errno(0x49)
+       ESHUTDOWN       = syscall.Errno(0x3a)
+       ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+       ESPIPE          = syscall.Errno(0x1d)
+       ESRCH           = syscall.Errno(0x3)
+       ESTALE          = syscall.Errno(0x46)
+       ETIMEDOUT       = syscall.Errno(0x3c)
+       ETOOMANYREFS    = syscall.Errno(0x3b)
+       ETXTBSY         = syscall.Errno(0x1a)
+       EUSERS          = syscall.Errno(0x44)
+       EWOULDBLOCK     = syscall.Errno(0x23)
+       EXDEV           = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+       SIGABRT   = syscall.Signal(0x6)
+       SIGALRM   = syscall.Signal(0xe)
+       SIGBUS    = syscall.Signal(0xa)
+       SIGCHLD   = syscall.Signal(0x14)
+       SIGCONT   = syscall.Signal(0x13)
+       SIGEMT    = syscall.Signal(0x7)
+       SIGFPE    = syscall.Signal(0x8)
+       SIGHUP    = syscall.Signal(0x1)
+       SIGILL    = syscall.Signal(0x4)
+       SIGINFO   = syscall.Signal(0x1d)
+       SIGINT    = syscall.Signal(0x2)
+       SIGIO     = syscall.Signal(0x17)
+       SIGIOT    = syscall.Signal(0x6)
+       SIGKILL   = syscall.Signal(0x9)
+       SIGLIBRT  = syscall.Signal(0x21)
+       SIGLWP    = syscall.Signal(0x20)
+       SIGPIPE   = syscall.Signal(0xd)
+       SIGPROF   = syscall.Signal(0x1b)
+       SIGQUIT   = syscall.Signal(0x3)
+       SIGSEGV   = syscall.Signal(0xb)
+       SIGSTOP   = syscall.Signal(0x11)
+       SIGSYS    = syscall.Signal(0xc)
+       SIGTERM   = syscall.Signal(0xf)
+       SIGTHR    = syscall.Signal(0x20)
+       SIGTRAP   = syscall.Signal(0x5)
+       SIGTSTP   = syscall.Signal(0x12)
+       SIGTTIN   = syscall.Signal(0x15)
+       SIGTTOU   = syscall.Signal(0x16)
+       SIGURG    = syscall.Signal(0x10)
+       SIGUSR1   = syscall.Signal(0x1e)
+       SIGUSR2   = syscall.Signal(0x1f)
+       SIGVTALRM = syscall.Signal(0x1a)
+       SIGWINCH  = syscall.Signal(0x1c)
+       SIGXCPU   = syscall.Signal(0x18)
+       SIGXFSZ   = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+       num  syscall.Errno
+       name string
+       desc string
+}{
+       {1, "EPERM", "operation not permitted"},
+       {2, "ENOENT", "no such file or directory"},
+       {3, "ESRCH", "no such process"},
+       {4, "EINTR", "interrupted system call"},
+       {5, "EIO", "input/output error"},
+       {6, "ENXIO", "device not configured"},
+       {7, "E2BIG", "argument list too long"},
+       {8, "ENOEXEC", "exec format error"},
+       {9, "EBADF", "bad file descriptor"},
+       {10, "ECHILD", "no child processes"},
+       {11, "EDEADLK", "resource deadlock avoided"},
+       {12, "ENOMEM", "cannot allocate memory"},
+       {13, "EACCES", "permission denied"},
+       {14, "EFAULT", "bad address"},
+       {15, "ENOTBLK", "block device required"},
+       {16, "EBUSY", "device busy"},
+       {17, "EEXIST", "file exists"},
+       {18, "EXDEV", "cross-device link"},
+       {19, "ENODEV", "operation not supported by device"},
+       {20, "ENOTDIR", "not a directory"},
+       {21, "EISDIR", "is a directory"},
+       {22, "EINVAL", "invalid argument"},
+       {23, "ENFILE", "too many open files in system"},
+       {24, "EMFILE", "too many open files"},
+       {25, "ENOTTY", "inappropriate ioctl for device"},
+       {26, "ETXTBSY", "text file busy"},
+       {27, "EFBIG", "file too large"},
+       {28, "ENOSPC", "no space left on device"},
+       {29, "ESPIPE", "illegal seek"},
+       {30, "EROFS", "read-only file system"},
+       {31, "EMLINK", "too many links"},
+       {32, "EPIPE", "broken pipe"},
+       {33, "EDOM", "numerical argument out of domain"},
+       {34, "ERANGE", "result too large"},
+       {35, "EWOULDBLOCK", "resource temporarily unavailable"},
+       {36, "EINPROGRESS", "operation now in progress"},
+       {37, "EALREADY", "operation already in progress"},
+       {38, "ENOTSOCK", "socket operation on non-socket"},
+       {39, "EDESTADDRREQ", "destination address required"},
+       {40, "EMSGSIZE", "message too long"},
+       {41, "EPROTOTYPE", "protocol wrong type for socket"},
+       {42, "ENOPROTOOPT", "protocol not available"},
+       {43, "EPROTONOSUPPORT", "protocol not supported"},
+       {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+       {45, "EOPNOTSUPP", "operation not supported"},
+       {46, "EPFNOSUPPORT", "protocol family not supported"},
+       {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+       {48, "EADDRINUSE", "address already in use"},
+       {49, "EADDRNOTAVAIL", "can't assign requested address"},
+       {50, "ENETDOWN", "network is down"},
+       {51, "ENETUNREACH", "network is unreachable"},
+       {52, "ENETRESET", "network dropped connection on reset"},
+       {53, "ECONNABORTED", "software caused connection abort"},
+       {54, "ECONNRESET", "connection reset by peer"},
+       {55, "ENOBUFS", "no buffer space available"},
+       {56, "EISCONN", "socket is already connected"},
+       {57, "ENOTCONN", "socket is not connected"},
+       {58, "ESHUTDOWN", "can't send after socket shutdown"},
+       {59, "ETOOMANYREFS", "too many references: can't splice"},
+       {60, "ETIMEDOUT", "operation timed out"},
+       {61, "ECONNREFUSED", "connection refused"},
+       {62, "ELOOP", "too many levels of symbolic links"},
+       {63, "ENAMETOOLONG", "file name too long"},
+       {64, "EHOSTDOWN", "host is down"},
+       {65, "EHOSTUNREACH", "no route to host"},
+       {66, "ENOTEMPTY", "directory not empty"},
+       {67, "EPROCLIM", "too many processes"},
+       {68, "EUSERS", "too many users"},
+       {69, "EDQUOT", "disc quota exceeded"},
+       {70, "ESTALE", "stale NFS file handle"},
+       {71, "EREMOTE", "too many levels of remote in path"},
+       {72, "EBADRPC", "RPC struct is bad"},
+       {73, "ERPCMISMATCH", "RPC version wrong"},
+       {74, "EPROGUNAVAIL", "RPC prog. not avail"},
+       {75, "EPROGMISMATCH", "program version wrong"},
+       {76, "EPROCUNAVAIL", "bad procedure for program"},
+       {77, "ENOLCK", "no locks available"},
+       {78, "ENOSYS", "function not implemented"},
+       {79, "EFTYPE", "inappropriate file type or format"},
+       {80, "EAUTH", "authentication error"},
+       {81, "ENEEDAUTH", "need authenticator"},
+       {82, "EIDRM", "identifier removed"},
+       {83, "ENOMSG", "no message of desired type"},
+       {84, "EOVERFLOW", "value too large to be stored in data type"},
+       {85, "ECANCELED", "operation canceled"},
+       {86, "EILSEQ", "illegal byte sequence"},
+       {87, "ENOATTR", "attribute not found"},
+       {88, "EDOOFUS", "programming error"},
+       {89, "EBADMSG", "bad message"},
+       {90, "EMULTIHOP", "multihop attempted"},
+       {91, "ENOLINK", "link has been severed"},
+       {92, "EPROTO", "protocol error"},
+       {93, "ENOTCAPABLE", "capabilities insufficient"},
+       {94, "ECAPMODE", "not permitted in capability mode"},
+       {95, "ENOTRECOVERABLE", "state not recoverable"},
+       {96, "EOWNERDEAD", "previous owner died"},
+       {97, "EINTEGRITY", "integrity check failed"},
+}
+
+// Signal table
+var signalList = [...]struct {
+       num  syscall.Signal
+       name string
+       desc string
+}{
+       {1, "SIGHUP", "hangup"},
+       {2, "SIGINT", "interrupt"},
+       {3, "SIGQUIT", "quit"},
+       {4, "SIGILL", "illegal instruction"},
+       {5, "SIGTRAP", "trace/BPT trap"},
+       {6, "SIGIOT", "abort trap"},
+       {7, "SIGEMT", "EMT trap"},
+       {8, "SIGFPE", "floating point exception"},
+       {9, "SIGKILL", "killed"},
+       {10, "SIGBUS", "bus error"},
+       {11, "SIGSEGV", "segmentation fault"},
+       {12, "SIGSYS", "bad system call"},
+       {13, "SIGPIPE", "broken pipe"},
+       {14, "SIGALRM", "alarm clock"},
+       {15, "SIGTERM", "terminated"},
+       {16, "SIGURG", "urgent I/O condition"},
+       {17, "SIGSTOP", "suspended (signal)"},
+       {18, "SIGTSTP", "suspended"},
+       {19, "SIGCONT", "continued"},
+       {20, "SIGCHLD", "child exited"},
+       {21, "SIGTTIN", "stopped (tty input)"},
+       {22, "SIGTTOU", "stopped (tty output)"},
+       {23, "SIGIO", "I/O possible"},
+       {24, "SIGXCPU", "cputime limit exceeded"},
+       {25, "SIGXFSZ", "filesize limit exceeded"},
+       {26, "SIGVTALRM", "virtual timer expired"},
+       {27, "SIGPROF", "profiling timer expired"},
+       {28, "SIGWINCH", "window size changes"},
+       {29, "SIGINFO", "information request"},
+       {30, "SIGUSR1", "user defined signal 1"},
+       {31, "SIGUSR2", "user defined signal 2"},
+       {32, "SIGTHR", "unknown signal"},
+       {33, "SIGLIBRT", "unknown signal"},
+}
index c0a43f8ba6fcd3e7dbba81154d53c33a54a600ca..785d693eb32856f12d223724f9fb00586248104f 100644 (file)
@@ -140,6 +140,306 @@ const (
        ARPHRD_VOID                                 = 0xffff
        ARPHRD_VSOCKMON                             = 0x33a
        ARPHRD_X25                                  = 0x10f
+       AUDIT_ADD                                   = 0x3eb
+       AUDIT_ADD_RULE                              = 0x3f3
+       AUDIT_ALWAYS                                = 0x2
+       AUDIT_ANOM_ABEND                            = 0x6a5
+       AUDIT_ANOM_CREAT                            = 0x6a7
+       AUDIT_ANOM_LINK                             = 0x6a6
+       AUDIT_ANOM_PROMISCUOUS                      = 0x6a4
+       AUDIT_ARCH                                  = 0xb
+       AUDIT_ARCH_AARCH64                          = 0xc00000b7
+       AUDIT_ARCH_ALPHA                            = 0xc0009026
+       AUDIT_ARCH_ARCOMPACT                        = 0x4000005d
+       AUDIT_ARCH_ARCOMPACTBE                      = 0x5d
+       AUDIT_ARCH_ARCV2                            = 0x400000c3
+       AUDIT_ARCH_ARCV2BE                          = 0xc3
+       AUDIT_ARCH_ARM                              = 0x40000028
+       AUDIT_ARCH_ARMEB                            = 0x28
+       AUDIT_ARCH_C6X                              = 0x4000008c
+       AUDIT_ARCH_C6XBE                            = 0x8c
+       AUDIT_ARCH_CRIS                             = 0x4000004c
+       AUDIT_ARCH_CSKY                             = 0x400000fc
+       AUDIT_ARCH_FRV                              = 0x5441
+       AUDIT_ARCH_H8300                            = 0x2e
+       AUDIT_ARCH_HEXAGON                          = 0xa4
+       AUDIT_ARCH_I386                             = 0x40000003
+       AUDIT_ARCH_IA64                             = 0xc0000032
+       AUDIT_ARCH_LOONGARCH32                      = 0x40000102
+       AUDIT_ARCH_LOONGARCH64                      = 0xc0000102
+       AUDIT_ARCH_M32R                             = 0x58
+       AUDIT_ARCH_M68K                             = 0x4
+       AUDIT_ARCH_MICROBLAZE                       = 0xbd
+       AUDIT_ARCH_MIPS                             = 0x8
+       AUDIT_ARCH_MIPS64                           = 0x80000008
+       AUDIT_ARCH_MIPS64N32                        = 0xa0000008
+       AUDIT_ARCH_MIPSEL                           = 0x40000008
+       AUDIT_ARCH_MIPSEL64                         = 0xc0000008
+       AUDIT_ARCH_MIPSEL64N32                      = 0xe0000008
+       AUDIT_ARCH_NDS32                            = 0x400000a7
+       AUDIT_ARCH_NDS32BE                          = 0xa7
+       AUDIT_ARCH_NIOS2                            = 0x40000071
+       AUDIT_ARCH_OPENRISC                         = 0x5c
+       AUDIT_ARCH_PARISC                           = 0xf
+       AUDIT_ARCH_PARISC64                         = 0x8000000f
+       AUDIT_ARCH_PPC                              = 0x14
+       AUDIT_ARCH_PPC64                            = 0x80000015
+       AUDIT_ARCH_PPC64LE                          = 0xc0000015
+       AUDIT_ARCH_RISCV32                          = 0x400000f3
+       AUDIT_ARCH_RISCV64                          = 0xc00000f3
+       AUDIT_ARCH_S390                             = 0x16
+       AUDIT_ARCH_S390X                            = 0x80000016
+       AUDIT_ARCH_SH                               = 0x2a
+       AUDIT_ARCH_SH64                             = 0x8000002a
+       AUDIT_ARCH_SHEL                             = 0x4000002a
+       AUDIT_ARCH_SHEL64                           = 0xc000002a
+       AUDIT_ARCH_SPARC                            = 0x2
+       AUDIT_ARCH_SPARC64                          = 0x8000002b
+       AUDIT_ARCH_TILEGX                           = 0xc00000bf
+       AUDIT_ARCH_TILEGX32                         = 0x400000bf
+       AUDIT_ARCH_TILEPRO                          = 0x400000bc
+       AUDIT_ARCH_UNICORE                          = 0x4000006e
+       AUDIT_ARCH_X86_64                           = 0xc000003e
+       AUDIT_ARCH_XTENSA                           = 0x5e
+       AUDIT_ARG0                                  = 0xc8
+       AUDIT_ARG1                                  = 0xc9
+       AUDIT_ARG2                                  = 0xca
+       AUDIT_ARG3                                  = 0xcb
+       AUDIT_AVC                                   = 0x578
+       AUDIT_AVC_PATH                              = 0x57a
+       AUDIT_BITMASK_SIZE                          = 0x40
+       AUDIT_BIT_MASK                              = 0x8000000
+       AUDIT_BIT_TEST                              = 0x48000000
+       AUDIT_BPF                                   = 0x536
+       AUDIT_BPRM_FCAPS                            = 0x529
+       AUDIT_CAPSET                                = 0x52a
+       AUDIT_CLASS_CHATTR                          = 0x2
+       AUDIT_CLASS_CHATTR_32                       = 0x3
+       AUDIT_CLASS_DIR_WRITE                       = 0x0
+       AUDIT_CLASS_DIR_WRITE_32                    = 0x1
+       AUDIT_CLASS_READ                            = 0x4
+       AUDIT_CLASS_READ_32                         = 0x5
+       AUDIT_CLASS_SIGNAL                          = 0x8
+       AUDIT_CLASS_SIGNAL_32                       = 0x9
+       AUDIT_CLASS_WRITE                           = 0x6
+       AUDIT_CLASS_WRITE_32                        = 0x7
+       AUDIT_COMPARE_AUID_TO_EUID                  = 0x10
+       AUDIT_COMPARE_AUID_TO_FSUID                 = 0xe
+       AUDIT_COMPARE_AUID_TO_OBJ_UID               = 0x5
+       AUDIT_COMPARE_AUID_TO_SUID                  = 0xf
+       AUDIT_COMPARE_EGID_TO_FSGID                 = 0x17
+       AUDIT_COMPARE_EGID_TO_OBJ_GID               = 0x4
+       AUDIT_COMPARE_EGID_TO_SGID                  = 0x18
+       AUDIT_COMPARE_EUID_TO_FSUID                 = 0x12
+       AUDIT_COMPARE_EUID_TO_OBJ_UID               = 0x3
+       AUDIT_COMPARE_EUID_TO_SUID                  = 0x11
+       AUDIT_COMPARE_FSGID_TO_OBJ_GID              = 0x9
+       AUDIT_COMPARE_FSUID_TO_OBJ_UID              = 0x8
+       AUDIT_COMPARE_GID_TO_EGID                   = 0x14
+       AUDIT_COMPARE_GID_TO_FSGID                  = 0x15
+       AUDIT_COMPARE_GID_TO_OBJ_GID                = 0x2
+       AUDIT_COMPARE_GID_TO_SGID                   = 0x16
+       AUDIT_COMPARE_SGID_TO_FSGID                 = 0x19
+       AUDIT_COMPARE_SGID_TO_OBJ_GID               = 0x7
+       AUDIT_COMPARE_SUID_TO_FSUID                 = 0x13
+       AUDIT_COMPARE_SUID_TO_OBJ_UID               = 0x6
+       AUDIT_COMPARE_UID_TO_AUID                   = 0xa
+       AUDIT_COMPARE_UID_TO_EUID                   = 0xb
+       AUDIT_COMPARE_UID_TO_FSUID                  = 0xc
+       AUDIT_COMPARE_UID_TO_OBJ_UID                = 0x1
+       AUDIT_COMPARE_UID_TO_SUID                   = 0xd
+       AUDIT_CONFIG_CHANGE                         = 0x519
+       AUDIT_CWD                                   = 0x51b
+       AUDIT_DAEMON_ABORT                          = 0x4b2
+       AUDIT_DAEMON_CONFIG                         = 0x4b3
+       AUDIT_DAEMON_END                            = 0x4b1
+       AUDIT_DAEMON_START                          = 0x4b0
+       AUDIT_DEL                                   = 0x3ec
+       AUDIT_DEL_RULE                              = 0x3f4
+       AUDIT_DEVMAJOR                              = 0x64
+       AUDIT_DEVMINOR                              = 0x65
+       AUDIT_DIR                                   = 0x6b
+       AUDIT_DM_CTRL                               = 0x53a
+       AUDIT_DM_EVENT                              = 0x53b
+       AUDIT_EGID                                  = 0x6
+       AUDIT_EOE                                   = 0x528
+       AUDIT_EQUAL                                 = 0x40000000
+       AUDIT_EUID                                  = 0x2
+       AUDIT_EVENT_LISTENER                        = 0x537
+       AUDIT_EXE                                   = 0x70
+       AUDIT_EXECVE                                = 0x51d
+       AUDIT_EXIT                                  = 0x67
+       AUDIT_FAIL_PANIC                            = 0x2
+       AUDIT_FAIL_PRINTK                           = 0x1
+       AUDIT_FAIL_SILENT                           = 0x0
+       AUDIT_FANOTIFY                              = 0x533
+       AUDIT_FD_PAIR                               = 0x525
+       AUDIT_FEATURE_BITMAP_ALL                    = 0x7f
+       AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT          = 0x1
+       AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME      = 0x2
+       AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND         = 0x8
+       AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH        = 0x4
+       AUDIT_FEATURE_BITMAP_FILTER_FS              = 0x40
+       AUDIT_FEATURE_BITMAP_LOST_RESET             = 0x20
+       AUDIT_FEATURE_BITMAP_SESSIONID_FILTER       = 0x10
+       AUDIT_FEATURE_CHANGE                        = 0x530
+       AUDIT_FEATURE_LOGINUID_IMMUTABLE            = 0x1
+       AUDIT_FEATURE_ONLY_UNSET_LOGINUID           = 0x0
+       AUDIT_FEATURE_VERSION                       = 0x1
+       AUDIT_FIELD_COMPARE                         = 0x6f
+       AUDIT_FILETYPE                              = 0x6c
+       AUDIT_FILTERKEY                             = 0xd2
+       AUDIT_FILTER_ENTRY                          = 0x2
+       AUDIT_FILTER_EXCLUDE                        = 0x5
+       AUDIT_FILTER_EXIT                           = 0x4
+       AUDIT_FILTER_FS                             = 0x6
+       AUDIT_FILTER_PREPEND                        = 0x10
+       AUDIT_FILTER_TASK                           = 0x1
+       AUDIT_FILTER_TYPE                           = 0x5
+       AUDIT_FILTER_URING_EXIT                     = 0x7
+       AUDIT_FILTER_USER                           = 0x0
+       AUDIT_FILTER_WATCH                          = 0x3
+       AUDIT_FIRST_KERN_ANOM_MSG                   = 0x6a4
+       AUDIT_FIRST_USER_MSG                        = 0x44c
+       AUDIT_FIRST_USER_MSG2                       = 0x834
+       AUDIT_FSGID                                 = 0x8
+       AUDIT_FSTYPE                                = 0x1a
+       AUDIT_FSUID                                 = 0x4
+       AUDIT_GET                                   = 0x3e8
+       AUDIT_GET_FEATURE                           = 0x3fb
+       AUDIT_GID                                   = 0x5
+       AUDIT_GREATER_THAN                          = 0x20000000
+       AUDIT_GREATER_THAN_OR_EQUAL                 = 0x60000000
+       AUDIT_INODE                                 = 0x66
+       AUDIT_INTEGRITY_DATA                        = 0x708
+       AUDIT_INTEGRITY_EVM_XATTR                   = 0x70e
+       AUDIT_INTEGRITY_HASH                        = 0x70b
+       AUDIT_INTEGRITY_METADATA                    = 0x709
+       AUDIT_INTEGRITY_PCR                         = 0x70c
+       AUDIT_INTEGRITY_POLICY_RULE                 = 0x70f
+       AUDIT_INTEGRITY_RULE                        = 0x70d
+       AUDIT_INTEGRITY_STATUS                      = 0x70a
+       AUDIT_IPC                                   = 0x517
+       AUDIT_IPC_SET_PERM                          = 0x51f
+       AUDIT_KERNEL                                = 0x7d0
+       AUDIT_KERNEL_OTHER                          = 0x524
+       AUDIT_KERN_MODULE                           = 0x532
+       AUDIT_LAST_FEATURE                          = 0x1
+       AUDIT_LAST_KERN_ANOM_MSG                    = 0x707
+       AUDIT_LAST_USER_MSG                         = 0x4af
+       AUDIT_LAST_USER_MSG2                        = 0xbb7
+       AUDIT_LESS_THAN                             = 0x10000000
+       AUDIT_LESS_THAN_OR_EQUAL                    = 0x50000000
+       AUDIT_LIST                                  = 0x3ea
+       AUDIT_LIST_RULES                            = 0x3f5
+       AUDIT_LOGIN                                 = 0x3ee
+       AUDIT_LOGINUID                              = 0x9
+       AUDIT_LOGINUID_SET                          = 0x18
+       AUDIT_MAC_CALIPSO_ADD                       = 0x58a
+       AUDIT_MAC_CALIPSO_DEL                       = 0x58b
+       AUDIT_MAC_CIPSOV4_ADD                       = 0x57f
+       AUDIT_MAC_CIPSOV4_DEL                       = 0x580
+       AUDIT_MAC_CONFIG_CHANGE                     = 0x57d
+       AUDIT_MAC_IPSEC_ADDSA                       = 0x583
+       AUDIT_MAC_IPSEC_ADDSPD                      = 0x585
+       AUDIT_MAC_IPSEC_DELSA                       = 0x584
+       AUDIT_MAC_IPSEC_DELSPD                      = 0x586
+       AUDIT_MAC_IPSEC_EVENT                       = 0x587
+       AUDIT_MAC_MAP_ADD                           = 0x581
+       AUDIT_MAC_MAP_DEL                           = 0x582
+       AUDIT_MAC_POLICY_LOAD                       = 0x57b
+       AUDIT_MAC_STATUS                            = 0x57c
+       AUDIT_MAC_UNLBL_ALLOW                       = 0x57e
+       AUDIT_MAC_UNLBL_STCADD                      = 0x588
+       AUDIT_MAC_UNLBL_STCDEL                      = 0x589
+       AUDIT_MAKE_EQUIV                            = 0x3f7
+       AUDIT_MAX_FIELDS                            = 0x40
+       AUDIT_MAX_FIELD_COMPARE                     = 0x19
+       AUDIT_MAX_KEY_LEN                           = 0x100
+       AUDIT_MESSAGE_TEXT_MAX                      = 0x2170
+       AUDIT_MMAP                                  = 0x52b
+       AUDIT_MQ_GETSETATTR                         = 0x523
+       AUDIT_MQ_NOTIFY                             = 0x522
+       AUDIT_MQ_OPEN                               = 0x520
+       AUDIT_MQ_SENDRECV                           = 0x521
+       AUDIT_MSGTYPE                               = 0xc
+       AUDIT_NEGATE                                = 0x80000000
+       AUDIT_NETFILTER_CFG                         = 0x52d
+       AUDIT_NETFILTER_PKT                         = 0x52c
+       AUDIT_NEVER                                 = 0x0
+       AUDIT_NLGRP_MAX                             = 0x1
+       AUDIT_NOT_EQUAL                             = 0x30000000
+       AUDIT_NR_FILTERS                            = 0x8
+       AUDIT_OBJ_GID                               = 0x6e
+       AUDIT_OBJ_LEV_HIGH                          = 0x17
+       AUDIT_OBJ_LEV_LOW                           = 0x16
+       AUDIT_OBJ_PID                               = 0x526
+       AUDIT_OBJ_ROLE                              = 0x14
+       AUDIT_OBJ_TYPE                              = 0x15
+       AUDIT_OBJ_UID                               = 0x6d
+       AUDIT_OBJ_USER                              = 0x13
+       AUDIT_OPENAT2                               = 0x539
+       AUDIT_OPERATORS                             = 0x78000000
+       AUDIT_PATH                                  = 0x516
+       AUDIT_PERM                                  = 0x6a
+       AUDIT_PERM_ATTR                             = 0x8
+       AUDIT_PERM_EXEC                             = 0x1
+       AUDIT_PERM_READ                             = 0x4
+       AUDIT_PERM_WRITE                            = 0x2
+       AUDIT_PERS                                  = 0xa
+       AUDIT_PID                                   = 0x0
+       AUDIT_POSSIBLE                              = 0x1
+       AUDIT_PPID                                  = 0x12
+       AUDIT_PROCTITLE                             = 0x52f
+       AUDIT_REPLACE                               = 0x531
+       AUDIT_SADDR_FAM                             = 0x71
+       AUDIT_SECCOMP                               = 0x52e
+       AUDIT_SELINUX_ERR                           = 0x579
+       AUDIT_SESSIONID                             = 0x19
+       AUDIT_SET                                   = 0x3e9
+       AUDIT_SET_FEATURE                           = 0x3fa
+       AUDIT_SGID                                  = 0x7
+       AUDIT_SID_UNSET                             = 0xffffffff
+       AUDIT_SIGNAL_INFO                           = 0x3f2
+       AUDIT_SOCKADDR                              = 0x51a
+       AUDIT_SOCKETCALL                            = 0x518
+       AUDIT_STATUS_BACKLOG_LIMIT                  = 0x10
+       AUDIT_STATUS_BACKLOG_WAIT_TIME              = 0x20
+       AUDIT_STATUS_BACKLOG_WAIT_TIME_ACTUAL       = 0x80
+       AUDIT_STATUS_ENABLED                        = 0x1
+       AUDIT_STATUS_FAILURE                        = 0x2
+       AUDIT_STATUS_LOST                           = 0x40
+       AUDIT_STATUS_PID                            = 0x4
+       AUDIT_STATUS_RATE_LIMIT                     = 0x8
+       AUDIT_SUBJ_CLR                              = 0x11
+       AUDIT_SUBJ_ROLE                             = 0xe
+       AUDIT_SUBJ_SEN                              = 0x10
+       AUDIT_SUBJ_TYPE                             = 0xf
+       AUDIT_SUBJ_USER                             = 0xd
+       AUDIT_SUCCESS                               = 0x68
+       AUDIT_SUID                                  = 0x3
+       AUDIT_SYSCALL                               = 0x514
+       AUDIT_SYSCALL_CLASSES                       = 0x10
+       AUDIT_TIME_ADJNTPVAL                        = 0x535
+       AUDIT_TIME_INJOFFSET                        = 0x534
+       AUDIT_TRIM                                  = 0x3f6
+       AUDIT_TTY                                   = 0x527
+       AUDIT_TTY_GET                               = 0x3f8
+       AUDIT_TTY_SET                               = 0x3f9
+       AUDIT_UID                                   = 0x1
+       AUDIT_UID_UNSET                             = 0xffffffff
+       AUDIT_UNUSED_BITS                           = 0x7fffc00
+       AUDIT_URINGOP                               = 0x538
+       AUDIT_USER                                  = 0x3ed
+       AUDIT_USER_AVC                              = 0x453
+       AUDIT_USER_TTY                              = 0x464
+       AUDIT_VERSION_BACKLOG_LIMIT                 = 0x1
+       AUDIT_VERSION_BACKLOG_WAIT_TIME             = 0x2
+       AUDIT_VERSION_LATEST                        = 0x7f
+       AUDIT_WATCH                                 = 0x69
+       AUDIT_WATCH_INS                             = 0x3ef
+       AUDIT_WATCH_LIST                            = 0x3f1
+       AUDIT_WATCH_REM                             = 0x3f0
        AUTOFS_SUPER_MAGIC                          = 0x187
        B0                                          = 0x0
        B110                                        = 0x3
@@ -184,6 +484,7 @@ const (
        BPF_F_ALLOW_MULTI                           = 0x2
        BPF_F_ALLOW_OVERRIDE                        = 0x1
        BPF_F_ANY_ALIGNMENT                         = 0x2
+       BPF_F_KPROBE_MULTI_RETURN                   = 0x1
        BPF_F_QUERY_EFFECTIVE                       = 0x1
        BPF_F_REPLACE                               = 0x4
        BPF_F_SLEEPABLE                             = 0x10
@@ -191,6 +492,8 @@ const (
        BPF_F_TEST_RND_HI32                         = 0x4
        BPF_F_TEST_RUN_ON_CPU                       = 0x1
        BPF_F_TEST_STATE_FREQ                       = 0x8
+       BPF_F_TEST_XDP_LIVE_FRAMES                  = 0x2
+       BPF_F_XDP_HAS_FRAGS                         = 0x20
        BPF_H                                       = 0x8
        BPF_IMM                                     = 0x0
        BPF_IND                                     = 0x40
@@ -517,9 +820,9 @@ const (
        DM_UUID_FLAG                                = 0x4000
        DM_UUID_LEN                                 = 0x81
        DM_VERSION                                  = 0xc138fd00
-       DM_VERSION_EXTRA                            = "-ioctl (2021-03-22)"
+       DM_VERSION_EXTRA                            = "-ioctl (2022-02-22)"
        DM_VERSION_MAJOR                            = 0x4
-       DM_VERSION_MINOR                            = 0x2d
+       DM_VERSION_MINOR                            = 0x2e
        DM_VERSION_PATCHLEVEL                       = 0x0
        DT_BLK                                      = 0x6
        DT_CHR                                      = 0x2
@@ -535,6 +838,55 @@ const (
        EFD_SEMAPHORE                               = 0x1
        EFIVARFS_MAGIC                              = 0xde5e81e4
        EFS_SUPER_MAGIC                             = 0x414a53
+       EM_386                                      = 0x3
+       EM_486                                      = 0x6
+       EM_68K                                      = 0x4
+       EM_860                                      = 0x7
+       EM_88K                                      = 0x5
+       EM_AARCH64                                  = 0xb7
+       EM_ALPHA                                    = 0x9026
+       EM_ALTERA_NIOS2                             = 0x71
+       EM_ARCOMPACT                                = 0x5d
+       EM_ARCV2                                    = 0xc3
+       EM_ARM                                      = 0x28
+       EM_BLACKFIN                                 = 0x6a
+       EM_BPF                                      = 0xf7
+       EM_CRIS                                     = 0x4c
+       EM_CSKY                                     = 0xfc
+       EM_CYGNUS_M32R                              = 0x9041
+       EM_CYGNUS_MN10300                           = 0xbeef
+       EM_FRV                                      = 0x5441
+       EM_H8_300                                   = 0x2e
+       EM_HEXAGON                                  = 0xa4
+       EM_IA_64                                    = 0x32
+       EM_LOONGARCH                                = 0x102
+       EM_M32                                      = 0x1
+       EM_M32R                                     = 0x58
+       EM_MICROBLAZE                               = 0xbd
+       EM_MIPS                                     = 0x8
+       EM_MIPS_RS3_LE                              = 0xa
+       EM_MIPS_RS4_BE                              = 0xa
+       EM_MN10300                                  = 0x59
+       EM_NDS32                                    = 0xa7
+       EM_NONE                                     = 0x0
+       EM_OPENRISC                                 = 0x5c
+       EM_PARISC                                   = 0xf
+       EM_PPC                                      = 0x14
+       EM_PPC64                                    = 0x15
+       EM_RISCV                                    = 0xf3
+       EM_S390                                     = 0x16
+       EM_S390_OLD                                 = 0xa390
+       EM_SH                                       = 0x2a
+       EM_SPARC                                    = 0x2
+       EM_SPARC32PLUS                              = 0x12
+       EM_SPARCV9                                  = 0x2b
+       EM_SPU                                      = 0x17
+       EM_TILEGX                                   = 0xbf
+       EM_TILEPRO                                  = 0xbc
+       EM_TI_C6000                                 = 0x8c
+       EM_UNICORE                                  = 0x6e
+       EM_X86_64                                   = 0x3e
+       EM_XTENSA                                   = 0x5e
        ENCODING_DEFAULT                            = 0x0
        ENCODING_FM_MARK                            = 0x3
        ENCODING_FM_SPACE                           = 0x4
@@ -712,6 +1064,7 @@ const (
        ETH_P_EDSA                                  = 0xdada
        ETH_P_ERSPAN                                = 0x88be
        ETH_P_ERSPAN2                               = 0x22eb
+       ETH_P_ETHERCAT                              = 0x88a4
        ETH_P_FCOE                                  = 0x8906
        ETH_P_FIP                                   = 0x8914
        ETH_P_HDLC                                  = 0x19
@@ -749,6 +1102,7 @@ const (
        ETH_P_PPP_MP                                = 0x8
        ETH_P_PPP_SES                               = 0x8864
        ETH_P_PREAUTH                               = 0x88c7
+       ETH_P_PROFINET                              = 0x8892
        ETH_P_PRP                                   = 0x88fb
        ETH_P_PUP                                   = 0x200
        ETH_P_PUPAT                                 = 0x201
@@ -837,6 +1191,7 @@ const (
        FAN_FS_ERROR                                = 0x8000
        FAN_MARK_ADD                                = 0x1
        FAN_MARK_DONT_FOLLOW                        = 0x4
+       FAN_MARK_EVICTABLE                          = 0x200
        FAN_MARK_FILESYSTEM                         = 0x100
        FAN_MARK_FLUSH                              = 0x80
        FAN_MARK_IGNORED_MASK                       = 0x20
@@ -1055,7 +1410,7 @@ const (
        IFA_F_STABLE_PRIVACY                        = 0x800
        IFA_F_TEMPORARY                             = 0x1
        IFA_F_TENTATIVE                             = 0x40
-       IFA_MAX                                     = 0xa
+       IFA_MAX                                     = 0xb
        IFF_ALLMULTI                                = 0x200
        IFF_ATTACH_QUEUE                            = 0x200
        IFF_AUTOMEDIA                               = 0x4000
@@ -1403,6 +1758,7 @@ const (
        LANDLOCK_ACCESS_FS_MAKE_SYM                 = 0x1000
        LANDLOCK_ACCESS_FS_READ_DIR                 = 0x8
        LANDLOCK_ACCESS_FS_READ_FILE                = 0x4
+       LANDLOCK_ACCESS_FS_REFER                    = 0x2000
        LANDLOCK_ACCESS_FS_REMOVE_DIR               = 0x10
        LANDLOCK_ACCESS_FS_REMOVE_FILE              = 0x20
        LANDLOCK_ACCESS_FS_WRITE_FILE               = 0x2
@@ -1758,6 +2114,7 @@ const (
        NLM_F_ACK_TLVS                              = 0x200
        NLM_F_APPEND                                = 0x800
        NLM_F_ATOMIC                                = 0x400
+       NLM_F_BULK                                  = 0x200
        NLM_F_CAPPED                                = 0x100
        NLM_F_CREATE                                = 0x400
        NLM_F_DUMP                                  = 0x300
@@ -2075,6 +2432,11 @@ const (
        PR_SET_UNALIGN                              = 0x6
        PR_SET_VMA                                  = 0x53564d41
        PR_SET_VMA_ANON_NAME                        = 0x0
+       PR_SME_GET_VL                               = 0x40
+       PR_SME_SET_VL                               = 0x3f
+       PR_SME_SET_VL_ONEXEC                        = 0x40000
+       PR_SME_VL_INHERIT                           = 0x20000
+       PR_SME_VL_LEN_MASK                          = 0xffff
        PR_SPEC_DISABLE                             = 0x4
        PR_SPEC_DISABLE_NOEXEC                      = 0x10
        PR_SPEC_ENABLE                              = 0x2
@@ -2227,8 +2589,9 @@ const (
        RTC_FEATURE_ALARM                           = 0x0
        RTC_FEATURE_ALARM_RES_2S                    = 0x3
        RTC_FEATURE_ALARM_RES_MINUTE                = 0x1
+       RTC_FEATURE_ALARM_WAKEUP_ONLY               = 0x7
        RTC_FEATURE_BACKUP_SWITCH_MODE              = 0x6
-       RTC_FEATURE_CNT                             = 0x7
+       RTC_FEATURE_CNT                             = 0x8
        RTC_FEATURE_CORRECTION                      = 0x5
        RTC_FEATURE_NEED_WEEK_DAY                   = 0x2
        RTC_FEATURE_UPDATE_INTERRUPT                = 0x4
@@ -2302,6 +2665,7 @@ const (
        RTM_DELRULE                                 = 0x21
        RTM_DELTCLASS                               = 0x29
        RTM_DELTFILTER                              = 0x2d
+       RTM_DELTUNNEL                               = 0x79
        RTM_DELVLAN                                 = 0x71
        RTM_F_CLONED                                = 0x200
        RTM_F_EQUALIZE                              = 0x400
@@ -2334,8 +2698,9 @@ const (
        RTM_GETSTATS                                = 0x5e
        RTM_GETTCLASS                               = 0x2a
        RTM_GETTFILTER                              = 0x2e
+       RTM_GETTUNNEL                               = 0x7a
        RTM_GETVLAN                                 = 0x72
-       RTM_MAX                                     = 0x77
+       RTM_MAX                                     = 0x7b
        RTM_NEWACTION                               = 0x30
        RTM_NEWADDR                                 = 0x14
        RTM_NEWADDRLABEL                            = 0x48
@@ -2359,11 +2724,13 @@ const (
        RTM_NEWSTATS                                = 0x5c
        RTM_NEWTCLASS                               = 0x28
        RTM_NEWTFILTER                              = 0x2c
-       RTM_NR_FAMILIES                             = 0x1a
-       RTM_NR_MSGTYPES                             = 0x68
+       RTM_NEWTUNNEL                               = 0x78
+       RTM_NR_FAMILIES                             = 0x1b
+       RTM_NR_MSGTYPES                             = 0x6c
        RTM_SETDCB                                  = 0x4f
        RTM_SETLINK                                 = 0x13
        RTM_SETNEIGHTBL                             = 0x43
+       RTM_SETSTATS                                = 0x5f
        RTNH_ALIGNTO                                = 0x4
        RTNH_COMPARE_MASK                           = 0x59
        RTNH_F_DEAD                                 = 0x1
@@ -2544,6 +2911,9 @@ const (
        SOCK_RDM                                    = 0x4
        SOCK_SEQPACKET                              = 0x5
        SOCK_SNDBUF_LOCK                            = 0x1
+       SOCK_TXREHASH_DEFAULT                       = 0xff
+       SOCK_TXREHASH_DISABLED                      = 0x0
+       SOCK_TXREHASH_ENABLED                       = 0x1
        SOL_AAL                                     = 0x109
        SOL_ALG                                     = 0x117
        SOL_ATM                                     = 0x108
@@ -2559,6 +2929,8 @@ const (
        SOL_IUCV                                    = 0x115
        SOL_KCM                                     = 0x119
        SOL_LLC                                     = 0x10c
+       SOL_MCTP                                    = 0x11d
+       SOL_MPTCP                                   = 0x11c
        SOL_NETBEUI                                 = 0x10b
        SOL_NETLINK                                 = 0x10e
        SOL_NFC                                     = 0x118
@@ -2568,6 +2940,7 @@ const (
        SOL_RAW                                     = 0xff
        SOL_RDS                                     = 0x114
        SOL_RXRPC                                   = 0x110
+       SOL_SMC                                     = 0x11e
        SOL_TCP                                     = 0x6
        SOL_TIPC                                    = 0x10f
        SOL_TLS                                     = 0x11a
@@ -2674,7 +3047,7 @@ const (
        TASKSTATS_GENL_NAME                         = "TASKSTATS"
        TASKSTATS_GENL_VERSION                      = 0x1
        TASKSTATS_TYPE_MAX                          = 0x6
-       TASKSTATS_VERSION                           = 0xb
+       TASKSTATS_VERSION                           = 0xd
        TCIFLUSH                                    = 0x0
        TCIOFF                                      = 0x2
        TCIOFLUSH                                   = 0x2
index 1b305fab1b8391bbfc232612edde0a08832146b1..274e2dabdfed7410974b7bef1895b2c62bfc5bf1 100644 (file)
@@ -326,6 +326,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -350,6 +351,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index 6bcdef5dd6bc0f68c9422cf25fb9140beac3d385..95b6eeedfece1ee7b5a4fbff3e7a2ee545e47292 100644 (file)
@@ -327,6 +327,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -351,6 +352,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index e65df0f8d193764174ebf82330732f917379e09c..918cd130ec8b3d5b104962cece13cfe7d8bd0c4b 100644 (file)
@@ -333,6 +333,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -357,6 +358,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index c7021115aa986632d69f63b4721d55f8666a7b04..3907dc5a90e5cff06ca9270c1657b4c50d332cf7 100644 (file)
@@ -323,6 +323,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -347,6 +348,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
@@ -511,6 +513,7 @@ const (
        WORDSIZE                         = 0x40
        XCASE                            = 0x4
        XTABS                            = 0x1800
+       ZA_MAGIC                         = 0x54366345
        _HIDIOCGRAWNAME                  = 0x80804804
        _HIDIOCGRAWPHYS                  = 0x80404805
        _HIDIOCGRAWUNIQ                  = 0x80404808
index 0d83a1cd45dbc423908562a99ae35972a4dbb8d3..03d5c105a3850c513cf9884c8c1532ff0d4d54dd 100644 (file)
@@ -109,8 +109,6 @@ const (
        IUCLC                            = 0x200
        IXOFF                            = 0x1000
        IXON                             = 0x400
-       LASX_CTX_MAGIC                   = 0x41535801
-       LSX_CTX_MAGIC                    = 0x53580001
        MAP_ANON                         = 0x20
        MAP_ANONYMOUS                    = 0x20
        MAP_DENYWRITE                    = 0x800
@@ -319,6 +317,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -343,6 +342,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index 7f44a495b7e699f7631cea5aadf8cd5b2fc531fd..bd794e0108ebc61a6bf64d8dbb875f5504dace00 100644 (file)
@@ -326,6 +326,7 @@ const (
        SO_RCVBUF                        = 0x1002
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x1004
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x1006
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x1006
@@ -351,6 +352,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x1008
        SO_WIFI_STATUS                   = 0x29
index 2f92b4e48ed7aacfd99d5761a665e02ef53e6835..6c741b054765ea8eaf366a6960da54b5d078a6a6 100644 (file)
@@ -326,6 +326,7 @@ const (
        SO_RCVBUF                        = 0x1002
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x1004
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x1006
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x1006
@@ -351,6 +352,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x1008
        SO_WIFI_STATUS                   = 0x29
index f5367a966b30b97dc534dad16f012767ce227142..807b8cd2a8d3ea48bcf690757e19c6766007c0c2 100644 (file)
@@ -326,6 +326,7 @@ const (
        SO_RCVBUF                        = 0x1002
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x1004
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x1006
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x1006
@@ -351,6 +352,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x1008
        SO_WIFI_STATUS                   = 0x29
index 2e22337d7cff8924127710b08a3e81aab7f0aa78..a39e4f5c206de1ca2fac2b88a24fbbd5a63b5136 100644 (file)
@@ -326,6 +326,7 @@ const (
        SO_RCVBUF                        = 0x1002
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x1004
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x1006
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x1006
@@ -351,6 +352,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x1008
        SO_WIFI_STATUS                   = 0x29
index 858c4f30f5b516508db287bc368e9029afdd04e8..c0fcda86b4cecf1c5198dd0ef7de1b1c16a3a66e 100644 (file)
@@ -381,6 +381,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x10
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x12
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x12
@@ -405,6 +406,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index af2a7ba6e61524efa950a0defd44f54929b15a8e..f3b72407aa66aeeccbc3ed3722dd46b34057e680 100644 (file)
@@ -385,6 +385,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x10
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x12
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x12
@@ -409,6 +410,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index eaa2eb8e2469bcd4ed6317be16ba9f3ed3f3250e..72f2a45d5038442eab471d0d03c8ea8479535f83 100644 (file)
@@ -385,6 +385,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x10
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x12
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x12
@@ -409,6 +410,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index faaa9f06378bd084d02daf917eba13f0faa1fdf7..45b214b4d3a8d115e4ee81b3a0a57057bc71e668 100644 (file)
@@ -314,6 +314,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -338,6 +339,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index 0d161f0b75fe17bd5c9957aa388f317e326241f7..1897f207bb389468d2d4d926ea5fe7b029767b95 100644 (file)
@@ -389,6 +389,7 @@ const (
        SO_RCVBUF                        = 0x8
        SO_RCVBUFFORCE                   = 0x21
        SO_RCVLOWAT                      = 0x12
+       SO_RCVMARK                       = 0x4b
        SO_RCVTIMEO                      = 0x14
        SO_RCVTIMEO_NEW                  = 0x42
        SO_RCVTIMEO_OLD                  = 0x14
@@ -413,6 +414,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x40
        SO_TIMESTAMPNS_OLD               = 0x23
        SO_TIMESTAMP_NEW                 = 0x3f
+       SO_TXREHASH                      = 0x4a
        SO_TXTIME                        = 0x3d
        SO_TYPE                          = 0x3
        SO_WIFI_STATUS                   = 0x29
index 4fd497a3e39a91dd97446c2b3c46a6a199475ce3..1fb7a3953a9ef7b0a40dbfbb64fc9a50eccd7635 100644 (file)
@@ -380,6 +380,7 @@ const (
        SO_RCVBUF                        = 0x1002
        SO_RCVBUFFORCE                   = 0x100b
        SO_RCVLOWAT                      = 0x800
+       SO_RCVMARK                       = 0x54
        SO_RCVTIMEO                      = 0x2000
        SO_RCVTIMEO_NEW                  = 0x44
        SO_RCVTIMEO_OLD                  = 0x2000
@@ -404,6 +405,7 @@ const (
        SO_TIMESTAMPNS_NEW               = 0x42
        SO_TIMESTAMPNS_OLD               = 0x21
        SO_TIMESTAMP_NEW                 = 0x46
+       SO_TXREHASH                      = 0x53
        SO_TXTIME                        = 0x3f
        SO_TYPE                          = 0x1008
        SO_WIFI_STATUS                   = 0x25
index e9d9997eeda96355b4bc499cf01a08591fabb85d..039c4aa06c2ccd1090e2d48fa14a1243a374e98d 100644 (file)
@@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat(fd int, stat *stat_freebsd11_t) (err error) {
+func Fstat(fd int, stat *Stat_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fsync(fd int) (err error) {
        _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
        if e1 != 0 {
@@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(buf) > 0 {
                _p0 = unsafe.Pointer(&buf[0])
@@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(buf) > 0 {
-               _p0 = unsafe.Pointer(&buf[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getdtablesize() (size int) {
        r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
        size = int(r0)
@@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func lstat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Mkdir(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1317,43 +1250,13 @@ func Mkfifo(path string, mode uint32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknod(path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat(fd int, path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
+func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
                return
        }
-       _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
+       _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
        if e1 != 0 {
                err = errnoErr(e1)
        }
@@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func stat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func statfs(path string, stat *statfs_freebsd11_t) (err error) {
+func Statfs(path string, stat *Statfs_t) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Symlink(path string, link string) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index edd373b1a562ecb409511eff8306c0c98ff83859..0535d3cfdf2bd0033c14c0cc4323fbe568eeb697 100644 (file)
@@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat(fd int, stat *stat_freebsd11_t) (err error) {
+func Fstat(fd int, stat *Stat_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fsync(fd int) (err error) {
        _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
        if e1 != 0 {
@@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(buf) > 0 {
                _p0 = unsafe.Pointer(&buf[0])
@@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(buf) > 0 {
-               _p0 = unsafe.Pointer(&buf[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getdtablesize() (size int) {
        r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
        size = int(r0)
@@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func lstat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Mkdir(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1317,22 +1250,7 @@ func Mkfifo(path string, mode uint32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknod(path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat(fd int, path string, mode uint32, dev int) (err error) {
+func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1347,21 +1265,6 @@ func mknodat(fd int, path string, mode uint32, dev int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
        _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
        if e1 != 0 {
@@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func stat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func statfs(path string, stat *statfs_freebsd11_t) (err error) {
+func Statfs(path string, stat *Statfs_t) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Symlink(path string, link string) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index 82e9764b25710e15b0a76249526f891b4c0269aa..1018b522170410170ee61050236f568ad6843cab 100644 (file)
@@ -351,22 +351,6 @@ func Munlockall() (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-       var _p0 unsafe.Pointer
-       if len(mib) > 0 {
-               _p0 = unsafe.Pointer(&mib[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func pipe2(p *[2]_C_int, flags int) (err error) {
        _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
        if e1 != 0 {
@@ -404,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+       var _p0 unsafe.Pointer
+       if len(mib) > 0 {
+               _p0 = unsafe.Pointer(&mib[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func ptrace(request int, pid int, addr uintptr, data int) (err error) {
        _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
        if e1 != 0 {
@@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat(fd int, stat *stat_freebsd11_t) (err error) {
+func Fstat(fd int, stat *Stat_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fsync(fd int) (err error) {
        _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
        if e1 != 0 {
@@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(buf) > 0 {
                _p0 = unsafe.Pointer(&buf[0])
@@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(buf) > 0 {
-               _p0 = unsafe.Pointer(&buf[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getdtablesize() (size int) {
        r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
        size = int(r0)
@@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func lstat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Mkdir(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1317,43 +1250,13 @@ func Mkfifo(path string, mode uint32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknod(path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat(fd int, path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
+func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
                return
        }
-       _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+       _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, uintptr(dev), uintptr(dev>>32))
        if e1 != 0 {
                err = errnoErr(e1)
        }
@@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func stat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func statfs(path string, stat *statfs_freebsd11_t) (err error) {
+func Statfs(path string, stat *Statfs_t) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Symlink(path string, link string) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index a6479acd1fc848b6aa91877614c49234314b6ae2..3802f4b379a5d6566d89e4fcc59cc9b16ddb1da0 100644 (file)
@@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat(fd int, stat *stat_freebsd11_t) (err error) {
+func Fstat(fd int, stat *Stat_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
        if e1 != 0 {
                err = errnoErr(e1)
@@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fsync(fd int) (err error) {
        _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
        if e1 != 0 {
@@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(buf) > 0 {
                _p0 = unsafe.Pointer(&buf[0])
@@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(buf) > 0 {
-               _p0 = unsafe.Pointer(&buf[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getdtablesize() (size int) {
        r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
        size = int(r0)
@@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func lstat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Mkdir(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1317,22 +1250,7 @@ func Mkfifo(path string, mode uint32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknod(path string, mode uint32, dev int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mknodat(fd int, path string, mode uint32, dev int) (err error) {
+func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1347,21 +1265,6 @@ func mknodat(fd int, path string, mode uint32, dev int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
        _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
        if e1 != 0 {
@@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func stat(path string, stat *stat_freebsd11_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func statfs(path string, stat *statfs_freebsd11_t) (err error) {
+func Statfs(path string, stat *Statfs_t) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
        if err != nil {
@@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Symlink(path string, link string) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
new file mode 100644 (file)
index 0000000..8a2db7d
--- /dev/null
@@ -0,0 +1,1889 @@
+// go run mksyscall.go -tags freebsd,riscv64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_riscv64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build freebsd && riscv64
+// +build freebsd,riscv64
+
+package unix
+
+import (
+       "syscall"
+       "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
+       r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(ngid int, gid *_Gid_t) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+       r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+       wpid = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+       r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+       _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+       _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+       r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+       _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+       _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+       _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+       _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(s int, how int) (err error) {
+       _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+       _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(p) > 0 {
+               _p0 = unsafe.Pointer(&p[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+       var _p0 unsafe.Pointer
+       if len(buf) > 0 {
+               _p0 = unsafe.Pointer(&buf[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+       r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+       r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
+       r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimes(fd int, timeval *[2]Timeval) (err error) {
+       _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, behav int) (err error) {
+       var _p0 unsafe.Pointer
+       if len(b) > 0 {
+               _p0 = unsafe.Pointer(&b[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+       var _p0 unsafe.Pointer
+       if len(b) > 0 {
+               _p0 = unsafe.Pointer(&b[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+       _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+       var _p0 unsafe.Pointer
+       if len(b) > 0 {
+               _p0 = unsafe.Pointer(&b[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+       var _p0 unsafe.Pointer
+       if len(b) > 0 {
+               _p0 = unsafe.Pointer(&b[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+       var _p0 unsafe.Pointer
+       if len(b) > 0 {
+               _p0 = unsafe.Pointer(&b[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+       _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+       _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(buf) > 0 {
+               _p0 = unsafe.Pointer(&buf[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+       var _p0 unsafe.Pointer
+       if len(mib) > 0 {
+               _p0 = unsafe.Pointer(&mib[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
+       _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func CapEnter() (err error) {
+       _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
+       _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func capRightsLimit(fd int, rightsp *CapRights) (err error) {
+       _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chflags(path string, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+       _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(fd int) (nfd int, err error) {
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+       nfd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(from int, to int) (err error) {
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+       Syscall(SYS_EXIT, uintptr(code), 0, 0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
+       r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(file)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(file)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(file)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(file)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(attrname)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+       _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+       _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchflags(fd int, flags int) (err error) {
+       _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+       _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+       _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+       _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fpathconf(fd int, name int) (val int, err error) {
+       r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+       val = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+       _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+       _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+       _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+       _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(buf) > 0 {
+               _p0 = unsafe.Pointer(&buf[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdtablesize() (size int) {
+       r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
+       size = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+       r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+       egid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+       r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+       uid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+       r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+       gid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+       r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+       pgid = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pgrp int) {
+       r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+       pgrp = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+       r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+       pid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+       r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+       ppid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+       r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+       prio = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(which int, lim *Rlimit) (err error) {
+       _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+       _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+       r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+       sid = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+       _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+       r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+       uid = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Issetugid() (tainted bool) {
+       r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+       tainted = bool(r0 != 0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, signum syscall.Signal) (err error) {
+       _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kqueue() (fd int, err error) {
+       r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, backlog int) (err error) {
+       _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+       _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pathconf(path string, name int) (val int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+       val = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(p) > 0 {
+               _p0 = unsafe.Pointer(&p[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(p) > 0 {
+               _p0 = unsafe.Pointer(&p[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(p) > 0 {
+               _p0 = unsafe.Pointer(&p[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 unsafe.Pointer
+       if len(buf) > 0 {
+               _p1 = unsafe.Pointer(&buf[0])
+       } else {
+               _p1 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 unsafe.Pointer
+       if len(buf) > 0 {
+               _p1 = unsafe.Pointer(&buf[0])
+       } else {
+               _p1 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(from)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(to)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(from)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(to)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Revoke(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+       r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+       newoffset = int64(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+       r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setegid(egid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seteuid(euid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(gid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setlogin(name string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(name)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+       _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(which int, lim *Rlimit) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+       r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+       pid = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tp *Timeval) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+       _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(link)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(oldpath)
+       if err != nil {
+               return
+       }
+       var _p1 *byte
+       _p1, err = BytePtrFromString(newpath)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() (err error) {
+       _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(newmask int) (oldmask int) {
+       r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+       oldmask = int(r0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Undelete(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(path string, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+       var _p0 unsafe.Pointer
+       if len(p) > 0 {
+               _p0 = unsafe.Pointer(&p[0])
+       } else {
+               _p0 = unsafe.Pointer(&_zero)
+       }
+       r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+       r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+       ret = uintptr(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+       _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+       r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
+       r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+       n = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
+       r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+       nfd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
index 8cdfbe71e6816b23017ccf9e182df54eac90bc4c..523f2ba03e4c37f8de4cedb718c81c870e8cfa47 100644 (file)
@@ -83,31 +83,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Fstat(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
-       var _p0 *byte
-       _p0, err = BytePtrFromString(path)
-       if err != nil {
-               return
-       }
-       _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fstatfs(fd int, buf *Statfs_t) (err error) {
        _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
        if e1 != 0 {
index a1a9bcbbdf614cfbaa210a4ceeb5500785a842b3..1239cc2de9c7b79c7f957b3997130a7490f2a838 100644 (file)
@@ -180,6 +180,17 @@ func Listen(s int, n int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func MemfdSecret(flags int) (fd int, err error) {
+       r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func pread(fd int, p []byte, offset int64) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(p) > 0 {
index 59d5dfc2092223dae026178367b50faaa6c23482..4e0d96107b9ebf9f2290a8d533a33d3a3b4cb99a 100644 (file)
@@ -1,4 +1,4 @@
-// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
+// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build 386 && freebsd
@@ -19,10 +19,9 @@ const (
        SYS_UNLINK                   = 10  // { int unlink(char *path); }
        SYS_CHDIR                    = 12  // { int chdir(char *path); }
        SYS_FCHDIR                   = 13  // { int fchdir(int fd); }
-       SYS_MKNOD                    = 14  // { int mknod(char *path, int mode, int dev); }
        SYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }
        SYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }
-       SYS_OBREAK                   = 17  // { int obreak(char *nsize); } break obreak_args int
+       SYS_BREAK                    = 17  // { caddr_t break(char *nsize); }
        SYS_GETPID                   = 20  // { pid_t getpid(void); }
        SYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }
        SYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }
@@ -43,7 +42,6 @@ const (
        SYS_KILL                     = 37  // { int kill(int pid, int signum); }
        SYS_GETPPID                  = 39  // { pid_t getppid(void); }
        SYS_DUP                      = 41  // { int dup(u_int fd); }
-       SYS_PIPE                     = 42  // { int pipe(void); }
        SYS_GETEGID                  = 43  // { gid_t getegid(void); }
        SYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
        SYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }
@@ -58,15 +56,14 @@ const (
        SYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }
        SYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }
        SYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }
-       SYS_UMASK                    = 60  // { int umask(int newmask); } umask umask_args int
+       SYS_UMASK                    = 60  // { int umask(int newmask); }
        SYS_CHROOT                   = 61  // { int chroot(char *path); }
        SYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }
        SYS_VFORK                    = 66  // { int vfork(void); }
        SYS_SBRK                     = 69  // { int sbrk(int incr); }
        SYS_SSTK                     = 70  // { int sstk(int incr); }
-       SYS_OVADVISE                 = 72  // { int ovadvise(int anom); } vadvise ovadvise_args int
        SYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }
-       SYS_MPROTECT                 = 74  // { int mprotect(const void *addr, size_t len, int prot); }
+       SYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }
        SYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }
        SYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }
        SYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }
@@ -124,14 +121,10 @@ const (
        SYS_SETGID                   = 181 // { int setgid(gid_t gid); }
        SYS_SETEGID                  = 182 // { int setegid(gid_t egid); }
        SYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }
-       SYS_STAT                     = 188 // { int stat(char *path, struct stat *ub); }
-       SYS_FSTAT                    = 189 // { int fstat(int fd, struct stat *sb); }
-       SYS_LSTAT                    = 190 // { int lstat(char *path, struct stat *ub); }
        SYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }
        SYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }
        SYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
        SYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
-       SYS_GETDIRENTRIES            = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
        SYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
        SYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }
        SYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }
@@ -143,12 +136,12 @@ const (
        SYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
        SYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }
        SYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
-       SYS_MSGRCV                   = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+       SYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
        SYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
        SYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }
        SYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }
        SYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
-       SYS_CLOCK_SETTIME            = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
+       SYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
        SYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
        SYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
        SYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }
@@ -157,50 +150,44 @@ const (
        SYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }
        SYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
        SYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
-       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
-       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
        SYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
-       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
+       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
        SYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
        SYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }
        SYS_RFORK                    = 251 // { int rfork(int flags); }
-       SYS_OPENBSD_POLL             = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
        SYS_ISSETUGID                = 253 // { int issetugid(void); }
        SYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }
        SYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }
        SYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }
-       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
-       SYS_GETDENTS                 = 272 // { int getdents(int fd, char *buf, size_t count); }
+       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
        SYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }
        SYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }
-       SYS_NSTAT                    = 278 // { int nstat(char *path, struct nstat *ub); }
-       SYS_NFSTAT                   = 279 // { int nfstat(int fd, struct nstat *sb); }
-       SYS_NLSTAT                   = 280 // { int nlstat(char *path, struct nstat *ub); }
        SYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
-       SYS_FHSTAT                   = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
        SYS_MODNEXT                  = 300 // { int modnext(int modid); }
-       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat *stat); }
+       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_statstat); }
        SYS_MODFNEXT                 = 302 // { int modfnext(int modid); }
        SYS_MODFIND                  = 303 // { int modfind(const char *name); }
        SYS_KLDLOAD                  = 304 // { int kldload(const char *file); }
        SYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }
        SYS_KLDFIND                  = 306 // { int kldfind(const char *file); }
        SYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }
-       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_statstat); }
+       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
        SYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }
        SYS_GETSID                   = 310 // { int getsid(pid_t pid); }
        SYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
        SYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
        SYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
-       SYS_AIO_SUSPEND              = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
+       SYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
        SYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
        SYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }
        SYS_YIELD                    = 321 // { int yield(void); }
        SYS_MLOCKALL                 = 324 // { int mlockall(int how); }
        SYS_MUNLOCKALL               = 325 // { int munlockall(void); }
-       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, u_int buflen); }
+       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }
        SYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
        SYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
        SYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
@@ -226,14 +213,13 @@ const (
        SYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
        SYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
        SYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
-       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
-       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
+       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
        SYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
        SYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
        SYS_KQUEUE                   = 362 // { int kqueue(void); }
-       SYS_KEVENT                   = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
        SYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
@@ -251,10 +237,6 @@ const (
        SYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }
        SYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
        SYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
-       SYS_GETFSSTAT                = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
-       SYS_STATFS                   = 396 // { int statfs(char *path, struct statfs *buf); }
-       SYS_FSTATFS                  = 397 // { int fstatfs(int fd, struct statfs *buf); }
-       SYS_FHSTATFS                 = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
        SYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }
        SYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }
        SYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }
@@ -267,14 +249,14 @@ const (
        SYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
        SYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
        SYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
-       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
+       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
        SYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
        SYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
-       SYS_SIGRETURN                = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
+       SYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
        SYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }
-       SYS_SETCONTEXT               = 422 // { int setcontext( const struct __ucontext *ucp); }
+       SYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }
        SYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
        SYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }
        SYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
@@ -288,10 +270,10 @@ const (
        SYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }
        SYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }
        SYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
        SYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
-       SYS_THR_SUSPEND              = 442 // { int thr_suspend( const struct timespec *timeout); }
+       SYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }
        SYS_THR_WAKE                 = 443 // { int thr_wake(long id); }
        SYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }
        SYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }
@@ -300,17 +282,17 @@ const (
        SYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }
        SYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }
        SYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }
-       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
-       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
        SYS_AUDITCTL                 = 453 // { int auditctl(char *path); }
        SYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
        SYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }
        SYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
        SYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
-       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd,                const struct mq_attr *attr,             struct mq_attr *oattr); }
-       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd,   char *msg_ptr, size_t msg_len,  unsigned *msg_prio,                     const struct timespec *abs_timeout); }
-       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd,              const char *msg_ptr, size_t msg_len,unsigned msg_prio,                  const struct timespec *abs_timeout);}
-       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd,         const struct sigevent *sigev); }
+       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
+       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
        SYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }
        SYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }
        SYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }
@@ -319,7 +301,7 @@ const (
        SYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }
        SYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
        SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
-       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
        SYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
        SYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
        SYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
@@ -338,14 +320,12 @@ const (
        SYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
        SYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
        SYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }
-       SYS_FSTATAT                  = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
        SYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
        SYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
        SYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
        SYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
-       SYS_MKNODAT                  = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
        SYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
-       SYS_READLINKAT               = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
+       SYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
        SYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
        SYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }
        SYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }
@@ -391,7 +371,24 @@ const (
        SYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
        SYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }
        SYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
-       SYS_NUMA_GETAFFINITY         = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
-       SYS_NUMA_SETAFFINITY         = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
        SYS_FDATASYNC                = 550 // { int fdatasync(int fd); }
+       SYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }
+       SYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
+       SYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
+       SYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
+       SYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }
+       SYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }
+       SYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
+       SYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
+       SYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
+       SYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+       SYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
+       SYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
+       SYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
+       SYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
+       SYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
+       SYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
+       SYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
+       SYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+       SYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
 )
index 342d471d2eb1ab844309af2e231533d8a9961898..01636b838d30ffb92ab0f8703372ac0324ab3590 100644 (file)
@@ -1,4 +1,4 @@
-// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
+// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build amd64 && freebsd
@@ -19,10 +19,9 @@ const (
        SYS_UNLINK                   = 10  // { int unlink(char *path); }
        SYS_CHDIR                    = 12  // { int chdir(char *path); }
        SYS_FCHDIR                   = 13  // { int fchdir(int fd); }
-       SYS_MKNOD                    = 14  // { int mknod(char *path, int mode, int dev); }
        SYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }
        SYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }
-       SYS_OBREAK                   = 17  // { int obreak(char *nsize); } break obreak_args int
+       SYS_BREAK                    = 17  // { caddr_t break(char *nsize); }
        SYS_GETPID                   = 20  // { pid_t getpid(void); }
        SYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }
        SYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }
@@ -43,7 +42,6 @@ const (
        SYS_KILL                     = 37  // { int kill(int pid, int signum); }
        SYS_GETPPID                  = 39  // { pid_t getppid(void); }
        SYS_DUP                      = 41  // { int dup(u_int fd); }
-       SYS_PIPE                     = 42  // { int pipe(void); }
        SYS_GETEGID                  = 43  // { gid_t getegid(void); }
        SYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
        SYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }
@@ -58,15 +56,14 @@ const (
        SYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }
        SYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }
        SYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }
-       SYS_UMASK                    = 60  // { int umask(int newmask); } umask umask_args int
+       SYS_UMASK                    = 60  // { int umask(int newmask); }
        SYS_CHROOT                   = 61  // { int chroot(char *path); }
        SYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }
        SYS_VFORK                    = 66  // { int vfork(void); }
        SYS_SBRK                     = 69  // { int sbrk(int incr); }
        SYS_SSTK                     = 70  // { int sstk(int incr); }
-       SYS_OVADVISE                 = 72  // { int ovadvise(int anom); } vadvise ovadvise_args int
        SYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }
-       SYS_MPROTECT                 = 74  // { int mprotect(const void *addr, size_t len, int prot); }
+       SYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }
        SYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }
        SYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }
        SYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }
@@ -124,14 +121,10 @@ const (
        SYS_SETGID                   = 181 // { int setgid(gid_t gid); }
        SYS_SETEGID                  = 182 // { int setegid(gid_t egid); }
        SYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }
-       SYS_STAT                     = 188 // { int stat(char *path, struct stat *ub); }
-       SYS_FSTAT                    = 189 // { int fstat(int fd, struct stat *sb); }
-       SYS_LSTAT                    = 190 // { int lstat(char *path, struct stat *ub); }
        SYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }
        SYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }
        SYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
        SYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
-       SYS_GETDIRENTRIES            = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
        SYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
        SYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }
        SYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }
@@ -143,12 +136,12 @@ const (
        SYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
        SYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }
        SYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
-       SYS_MSGRCV                   = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+       SYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
        SYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
        SYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }
        SYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }
        SYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
-       SYS_CLOCK_SETTIME            = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
+       SYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
        SYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
        SYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
        SYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }
@@ -157,50 +150,44 @@ const (
        SYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }
        SYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
        SYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
-       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
-       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
        SYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
-       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
+       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
        SYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
        SYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }
        SYS_RFORK                    = 251 // { int rfork(int flags); }
-       SYS_OPENBSD_POLL             = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
        SYS_ISSETUGID                = 253 // { int issetugid(void); }
        SYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }
        SYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }
        SYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }
-       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
-       SYS_GETDENTS                 = 272 // { int getdents(int fd, char *buf, size_t count); }
+       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
        SYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }
        SYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }
-       SYS_NSTAT                    = 278 // { int nstat(char *path, struct nstat *ub); }
-       SYS_NFSTAT                   = 279 // { int nfstat(int fd, struct nstat *sb); }
-       SYS_NLSTAT                   = 280 // { int nlstat(char *path, struct nstat *ub); }
        SYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
-       SYS_FHSTAT                   = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
        SYS_MODNEXT                  = 300 // { int modnext(int modid); }
-       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat *stat); }
+       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_statstat); }
        SYS_MODFNEXT                 = 302 // { int modfnext(int modid); }
        SYS_MODFIND                  = 303 // { int modfind(const char *name); }
        SYS_KLDLOAD                  = 304 // { int kldload(const char *file); }
        SYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }
        SYS_KLDFIND                  = 306 // { int kldfind(const char *file); }
        SYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }
-       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_statstat); }
+       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
        SYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }
        SYS_GETSID                   = 310 // { int getsid(pid_t pid); }
        SYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
        SYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
        SYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
-       SYS_AIO_SUSPEND              = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
+       SYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
        SYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
        SYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }
        SYS_YIELD                    = 321 // { int yield(void); }
        SYS_MLOCKALL                 = 324 // { int mlockall(int how); }
        SYS_MUNLOCKALL               = 325 // { int munlockall(void); }
-       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, u_int buflen); }
+       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }
        SYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
        SYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
        SYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
@@ -226,14 +213,13 @@ const (
        SYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
        SYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
        SYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
-       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
-       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
+       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
        SYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
        SYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
        SYS_KQUEUE                   = 362 // { int kqueue(void); }
-       SYS_KEVENT                   = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
        SYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
@@ -251,10 +237,6 @@ const (
        SYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }
        SYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
        SYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
-       SYS_GETFSSTAT                = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
-       SYS_STATFS                   = 396 // { int statfs(char *path, struct statfs *buf); }
-       SYS_FSTATFS                  = 397 // { int fstatfs(int fd, struct statfs *buf); }
-       SYS_FHSTATFS                 = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
        SYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }
        SYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }
        SYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }
@@ -267,14 +249,14 @@ const (
        SYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
        SYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
        SYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
-       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
+       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
        SYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
        SYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
-       SYS_SIGRETURN                = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
+       SYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
        SYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }
-       SYS_SETCONTEXT               = 422 // { int setcontext( const struct __ucontext *ucp); }
+       SYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }
        SYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
        SYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }
        SYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
@@ -288,10 +270,10 @@ const (
        SYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }
        SYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }
        SYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
        SYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
-       SYS_THR_SUSPEND              = 442 // { int thr_suspend( const struct timespec *timeout); }
+       SYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }
        SYS_THR_WAKE                 = 443 // { int thr_wake(long id); }
        SYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }
        SYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }
@@ -300,17 +282,17 @@ const (
        SYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }
        SYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }
        SYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }
-       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
-       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
        SYS_AUDITCTL                 = 453 // { int auditctl(char *path); }
        SYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
        SYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }
        SYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
        SYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
-       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd,                const struct mq_attr *attr,             struct mq_attr *oattr); }
-       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd,   char *msg_ptr, size_t msg_len,  unsigned *msg_prio,                     const struct timespec *abs_timeout); }
-       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd,              const char *msg_ptr, size_t msg_len,unsigned msg_prio,                  const struct timespec *abs_timeout);}
-       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd,         const struct sigevent *sigev); }
+       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
+       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
        SYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }
        SYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }
        SYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }
@@ -319,7 +301,7 @@ const (
        SYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }
        SYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
        SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
-       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
        SYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
        SYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
        SYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
@@ -338,14 +320,12 @@ const (
        SYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
        SYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
        SYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }
-       SYS_FSTATAT                  = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
        SYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
        SYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
        SYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
        SYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
-       SYS_MKNODAT                  = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
        SYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
-       SYS_READLINKAT               = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
+       SYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
        SYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
        SYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }
        SYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }
@@ -391,7 +371,24 @@ const (
        SYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
        SYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }
        SYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
-       SYS_NUMA_GETAFFINITY         = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
-       SYS_NUMA_SETAFFINITY         = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
        SYS_FDATASYNC                = 550 // { int fdatasync(int fd); }
+       SYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }
+       SYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
+       SYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
+       SYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
+       SYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }
+       SYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }
+       SYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
+       SYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
+       SYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
+       SYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+       SYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
+       SYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
+       SYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
+       SYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
+       SYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
+       SYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
+       SYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
+       SYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+       SYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
 )
index e2e3d72c5b04f3a4d27d3289b98ee00ec1a0bd6d..ad99bc106a86fe9f81a6f3370c197b42d605a558 100644 (file)
@@ -1,4 +1,4 @@
-// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
+// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build arm && freebsd
@@ -19,10 +19,9 @@ const (
        SYS_UNLINK                   = 10  // { int unlink(char *path); }
        SYS_CHDIR                    = 12  // { int chdir(char *path); }
        SYS_FCHDIR                   = 13  // { int fchdir(int fd); }
-       SYS_MKNOD                    = 14  // { int mknod(char *path, int mode, int dev); }
        SYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }
        SYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }
-       SYS_OBREAK                   = 17  // { int obreak(char *nsize); } break obreak_args int
+       SYS_BREAK                    = 17  // { caddr_t break(char *nsize); }
        SYS_GETPID                   = 20  // { pid_t getpid(void); }
        SYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }
        SYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }
@@ -43,7 +42,6 @@ const (
        SYS_KILL                     = 37  // { int kill(int pid, int signum); }
        SYS_GETPPID                  = 39  // { pid_t getppid(void); }
        SYS_DUP                      = 41  // { int dup(u_int fd); }
-       SYS_PIPE                     = 42  // { int pipe(void); }
        SYS_GETEGID                  = 43  // { gid_t getegid(void); }
        SYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
        SYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }
@@ -58,15 +56,14 @@ const (
        SYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }
        SYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }
        SYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }
-       SYS_UMASK                    = 60  // { int umask(int newmask); } umask umask_args int
+       SYS_UMASK                    = 60  // { int umask(int newmask); }
        SYS_CHROOT                   = 61  // { int chroot(char *path); }
        SYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }
        SYS_VFORK                    = 66  // { int vfork(void); }
        SYS_SBRK                     = 69  // { int sbrk(int incr); }
        SYS_SSTK                     = 70  // { int sstk(int incr); }
-       SYS_OVADVISE                 = 72  // { int ovadvise(int anom); } vadvise ovadvise_args int
        SYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }
-       SYS_MPROTECT                 = 74  // { int mprotect(const void *addr, size_t len, int prot); }
+       SYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }
        SYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }
        SYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }
        SYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }
@@ -124,14 +121,10 @@ const (
        SYS_SETGID                   = 181 // { int setgid(gid_t gid); }
        SYS_SETEGID                  = 182 // { int setegid(gid_t egid); }
        SYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }
-       SYS_STAT                     = 188 // { int stat(char *path, struct stat *ub); }
-       SYS_FSTAT                    = 189 // { int fstat(int fd, struct stat *sb); }
-       SYS_LSTAT                    = 190 // { int lstat(char *path, struct stat *ub); }
        SYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }
        SYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }
        SYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
        SYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
-       SYS_GETDIRENTRIES            = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
        SYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
        SYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }
        SYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }
@@ -143,12 +136,12 @@ const (
        SYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
        SYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }
        SYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
-       SYS_MSGRCV                   = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+       SYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
        SYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
        SYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }
        SYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }
        SYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
-       SYS_CLOCK_SETTIME            = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
+       SYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
        SYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
        SYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
        SYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }
@@ -157,50 +150,44 @@ const (
        SYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }
        SYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
        SYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
-       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
-       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
        SYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
-       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
+       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
        SYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
        SYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }
        SYS_RFORK                    = 251 // { int rfork(int flags); }
-       SYS_OPENBSD_POLL             = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
        SYS_ISSETUGID                = 253 // { int issetugid(void); }
        SYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }
        SYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }
        SYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }
-       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
-       SYS_GETDENTS                 = 272 // { int getdents(int fd, char *buf, size_t count); }
+       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
        SYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }
        SYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }
-       SYS_NSTAT                    = 278 // { int nstat(char *path, struct nstat *ub); }
-       SYS_NFSTAT                   = 279 // { int nfstat(int fd, struct nstat *sb); }
-       SYS_NLSTAT                   = 280 // { int nlstat(char *path, struct nstat *ub); }
        SYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
-       SYS_FHSTAT                   = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
        SYS_MODNEXT                  = 300 // { int modnext(int modid); }
-       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat *stat); }
+       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_statstat); }
        SYS_MODFNEXT                 = 302 // { int modfnext(int modid); }
        SYS_MODFIND                  = 303 // { int modfind(const char *name); }
        SYS_KLDLOAD                  = 304 // { int kldload(const char *file); }
        SYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }
        SYS_KLDFIND                  = 306 // { int kldfind(const char *file); }
        SYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }
-       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_statstat); }
+       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
        SYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }
        SYS_GETSID                   = 310 // { int getsid(pid_t pid); }
        SYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
        SYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
        SYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
-       SYS_AIO_SUSPEND              = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
+       SYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
        SYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
        SYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }
        SYS_YIELD                    = 321 // { int yield(void); }
        SYS_MLOCKALL                 = 324 // { int mlockall(int how); }
        SYS_MUNLOCKALL               = 325 // { int munlockall(void); }
-       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, u_int buflen); }
+       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }
        SYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
        SYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
        SYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
@@ -226,14 +213,13 @@ const (
        SYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
        SYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
        SYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
-       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
-       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
+       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
        SYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
        SYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
        SYS_KQUEUE                   = 362 // { int kqueue(void); }
-       SYS_KEVENT                   = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
        SYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
@@ -251,10 +237,6 @@ const (
        SYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }
        SYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
        SYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
-       SYS_GETFSSTAT                = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
-       SYS_STATFS                   = 396 // { int statfs(char *path, struct statfs *buf); }
-       SYS_FSTATFS                  = 397 // { int fstatfs(int fd, struct statfs *buf); }
-       SYS_FHSTATFS                 = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
        SYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }
        SYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }
        SYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }
@@ -267,14 +249,14 @@ const (
        SYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
        SYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
        SYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
-       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
+       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
        SYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
        SYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
-       SYS_SIGRETURN                = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
+       SYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
        SYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }
-       SYS_SETCONTEXT               = 422 // { int setcontext( const struct __ucontext *ucp); }
+       SYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }
        SYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
        SYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }
        SYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
@@ -288,10 +270,10 @@ const (
        SYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }
        SYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }
        SYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
        SYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
-       SYS_THR_SUSPEND              = 442 // { int thr_suspend( const struct timespec *timeout); }
+       SYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }
        SYS_THR_WAKE                 = 443 // { int thr_wake(long id); }
        SYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }
        SYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }
@@ -300,17 +282,17 @@ const (
        SYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }
        SYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }
        SYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }
-       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
-       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
        SYS_AUDITCTL                 = 453 // { int auditctl(char *path); }
        SYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
        SYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }
        SYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
        SYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
-       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd,                const struct mq_attr *attr,             struct mq_attr *oattr); }
-       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd,   char *msg_ptr, size_t msg_len,  unsigned *msg_prio,                     const struct timespec *abs_timeout); }
-       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd,              const char *msg_ptr, size_t msg_len,unsigned msg_prio,                  const struct timespec *abs_timeout);}
-       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd,         const struct sigevent *sigev); }
+       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
+       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
        SYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }
        SYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }
        SYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }
@@ -319,7 +301,7 @@ const (
        SYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }
        SYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
        SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
-       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
        SYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
        SYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
        SYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
@@ -338,14 +320,12 @@ const (
        SYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
        SYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
        SYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }
-       SYS_FSTATAT                  = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
        SYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
        SYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
        SYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
        SYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
-       SYS_MKNODAT                  = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
        SYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
-       SYS_READLINKAT               = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
+       SYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
        SYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
        SYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }
        SYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }
@@ -391,7 +371,24 @@ const (
        SYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
        SYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }
        SYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
-       SYS_NUMA_GETAFFINITY         = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
-       SYS_NUMA_SETAFFINITY         = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
        SYS_FDATASYNC                = 550 // { int fdatasync(int fd); }
+       SYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }
+       SYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
+       SYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
+       SYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
+       SYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }
+       SYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }
+       SYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
+       SYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
+       SYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
+       SYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+       SYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
+       SYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
+       SYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
+       SYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
+       SYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
+       SYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
+       SYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
+       SYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+       SYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
 )
index 61ad5ca3c19b606c4aab7f893939e95c9306e84b..89dcc42747657cb1d98a7f92f2933a5de7404623 100644 (file)
@@ -1,4 +1,4 @@
-// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
+// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build arm64 && freebsd
@@ -19,10 +19,9 @@ const (
        SYS_UNLINK                   = 10  // { int unlink(char *path); }
        SYS_CHDIR                    = 12  // { int chdir(char *path); }
        SYS_FCHDIR                   = 13  // { int fchdir(int fd); }
-       SYS_MKNOD                    = 14  // { int mknod(char *path, int mode, int dev); }
        SYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }
        SYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }
-       SYS_OBREAK                   = 17  // { int obreak(char *nsize); } break obreak_args int
+       SYS_BREAK                    = 17  // { caddr_t break(char *nsize); }
        SYS_GETPID                   = 20  // { pid_t getpid(void); }
        SYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }
        SYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }
@@ -43,7 +42,6 @@ const (
        SYS_KILL                     = 37  // { int kill(int pid, int signum); }
        SYS_GETPPID                  = 39  // { pid_t getppid(void); }
        SYS_DUP                      = 41  // { int dup(u_int fd); }
-       SYS_PIPE                     = 42  // { int pipe(void); }
        SYS_GETEGID                  = 43  // { gid_t getegid(void); }
        SYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
        SYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }
@@ -58,15 +56,14 @@ const (
        SYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }
        SYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }
        SYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }
-       SYS_UMASK                    = 60  // { int umask(int newmask); } umask umask_args int
+       SYS_UMASK                    = 60  // { int umask(int newmask); }
        SYS_CHROOT                   = 61  // { int chroot(char *path); }
        SYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }
        SYS_VFORK                    = 66  // { int vfork(void); }
        SYS_SBRK                     = 69  // { int sbrk(int incr); }
        SYS_SSTK                     = 70  // { int sstk(int incr); }
-       SYS_OVADVISE                 = 72  // { int ovadvise(int anom); } vadvise ovadvise_args int
        SYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }
-       SYS_MPROTECT                 = 74  // { int mprotect(const void *addr, size_t len, int prot); }
+       SYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }
        SYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }
        SYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }
        SYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }
@@ -124,14 +121,10 @@ const (
        SYS_SETGID                   = 181 // { int setgid(gid_t gid); }
        SYS_SETEGID                  = 182 // { int setegid(gid_t egid); }
        SYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }
-       SYS_STAT                     = 188 // { int stat(char *path, struct stat *ub); }
-       SYS_FSTAT                    = 189 // { int fstat(int fd, struct stat *sb); }
-       SYS_LSTAT                    = 190 // { int lstat(char *path, struct stat *ub); }
        SYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }
        SYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }
        SYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
        SYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
-       SYS_GETDIRENTRIES            = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
        SYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
        SYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }
        SYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }
@@ -143,12 +136,12 @@ const (
        SYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
        SYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }
        SYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
-       SYS_MSGRCV                   = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+       SYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
        SYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
        SYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }
        SYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }
        SYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
-       SYS_CLOCK_SETTIME            = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
+       SYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
        SYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
        SYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
        SYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }
@@ -157,50 +150,44 @@ const (
        SYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }
        SYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
        SYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
-       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
-       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
        SYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
-       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
+       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
        SYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
        SYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }
        SYS_RFORK                    = 251 // { int rfork(int flags); }
-       SYS_OPENBSD_POLL             = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
        SYS_ISSETUGID                = 253 // { int issetugid(void); }
        SYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }
        SYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }
        SYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }
-       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
-       SYS_GETDENTS                 = 272 // { int getdents(int fd, char *buf, size_t count); }
+       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
        SYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }
        SYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }
-       SYS_NSTAT                    = 278 // { int nstat(char *path, struct nstat *ub); }
-       SYS_NFSTAT                   = 279 // { int nfstat(int fd, struct nstat *sb); }
-       SYS_NLSTAT                   = 280 // { int nlstat(char *path, struct nstat *ub); }
        SYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
        SYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
-       SYS_FHSTAT                   = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
        SYS_MODNEXT                  = 300 // { int modnext(int modid); }
-       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat *stat); }
+       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_statstat); }
        SYS_MODFNEXT                 = 302 // { int modfnext(int modid); }
        SYS_MODFIND                  = 303 // { int modfind(const char *name); }
        SYS_KLDLOAD                  = 304 // { int kldload(const char *file); }
        SYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }
        SYS_KLDFIND                  = 306 // { int kldfind(const char *file); }
        SYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }
-       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_statstat); }
+       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
        SYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }
        SYS_GETSID                   = 310 // { int getsid(pid_t pid); }
        SYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
        SYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
        SYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
-       SYS_AIO_SUSPEND              = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
+       SYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
        SYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
        SYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }
        SYS_YIELD                    = 321 // { int yield(void); }
        SYS_MLOCKALL                 = 324 // { int mlockall(int how); }
        SYS_MUNLOCKALL               = 325 // { int munlockall(void); }
-       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, u_int buflen); }
+       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }
        SYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
        SYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
        SYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
@@ -226,14 +213,13 @@ const (
        SYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
        SYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
        SYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
-       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
-       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
+       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
        SYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
        SYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
        SYS_KQUEUE                   = 362 // { int kqueue(void); }
-       SYS_KEVENT                   = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
        SYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
        SYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
@@ -251,10 +237,6 @@ const (
        SYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }
        SYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
        SYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
-       SYS_GETFSSTAT                = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
-       SYS_STATFS                   = 396 // { int statfs(char *path, struct statfs *buf); }
-       SYS_FSTATFS                  = 397 // { int fstatfs(int fd, struct statfs *buf); }
-       SYS_FHSTATFS                 = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
        SYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }
        SYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }
        SYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }
@@ -267,14 +249,14 @@ const (
        SYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
        SYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
        SYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
-       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
-       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
+       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
        SYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
        SYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
-       SYS_SIGRETURN                = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
+       SYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
        SYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }
-       SYS_SETCONTEXT               = 422 // { int setcontext( const struct __ucontext *ucp); }
+       SYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }
        SYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
        SYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }
        SYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
@@ -288,10 +270,10 @@ const (
        SYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }
        SYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }
        SYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
-       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
        SYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
-       SYS_THR_SUSPEND              = 442 // { int thr_suspend( const struct timespec *timeout); }
+       SYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }
        SYS_THR_WAKE                 = 443 // { int thr_wake(long id); }
        SYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }
        SYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }
@@ -300,17 +282,17 @@ const (
        SYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }
        SYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }
        SYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }
-       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
-       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
        SYS_AUDITCTL                 = 453 // { int auditctl(char *path); }
        SYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
        SYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }
        SYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
        SYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
-       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd,                const struct mq_attr *attr,             struct mq_attr *oattr); }
-       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd,   char *msg_ptr, size_t msg_len,  unsigned *msg_prio,                     const struct timespec *abs_timeout); }
-       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd,              const char *msg_ptr, size_t msg_len,unsigned msg_prio,                  const struct timespec *abs_timeout);}
-       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd,         const struct sigevent *sigev); }
+       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
+       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
        SYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }
        SYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }
        SYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }
@@ -319,7 +301,7 @@ const (
        SYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }
        SYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
        SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
-       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
        SYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
        SYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
        SYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
@@ -338,14 +320,12 @@ const (
        SYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
        SYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
        SYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }
-       SYS_FSTATAT                  = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
        SYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
        SYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
        SYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
        SYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
-       SYS_MKNODAT                  = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
        SYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
-       SYS_READLINKAT               = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
+       SYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
        SYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
        SYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }
        SYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }
@@ -391,7 +371,24 @@ const (
        SYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
        SYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }
        SYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
-       SYS_NUMA_GETAFFINITY         = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
-       SYS_NUMA_SETAFFINITY         = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
        SYS_FDATASYNC                = 550 // { int fdatasync(int fd); }
+       SYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }
+       SYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
+       SYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
+       SYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
+       SYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }
+       SYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }
+       SYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
+       SYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
+       SYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
+       SYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+       SYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
+       SYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
+       SYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
+       SYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
+       SYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
+       SYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
+       SYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
+       SYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+       SYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
 )
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go b/src/cmd/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go
new file mode 100644 (file)
index 0000000..ee37aaa
--- /dev/null
@@ -0,0 +1,394 @@
+// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && freebsd
+// +build riscv64,freebsd
+
+package unix
+
+const (
+       // SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
+       SYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void
+       SYS_FORK                     = 2   // { int fork(void); }
+       SYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }
+       SYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }
+       SYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }
+       SYS_CLOSE                    = 6   // { int close(int fd); }
+       SYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }
+       SYS_LINK                     = 9   // { int link(char *path, char *link); }
+       SYS_UNLINK                   = 10  // { int unlink(char *path); }
+       SYS_CHDIR                    = 12  // { int chdir(char *path); }
+       SYS_FCHDIR                   = 13  // { int fchdir(int fd); }
+       SYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }
+       SYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }
+       SYS_BREAK                    = 17  // { caddr_t break(char *nsize); }
+       SYS_GETPID                   = 20  // { pid_t getpid(void); }
+       SYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }
+       SYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }
+       SYS_SETUID                   = 23  // { int setuid(uid_t uid); }
+       SYS_GETUID                   = 24  // { uid_t getuid(void); }
+       SYS_GETEUID                  = 25  // { uid_t geteuid(void); }
+       SYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
+       SYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }
+       SYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }
+       SYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }
+       SYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }
+       SYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
+       SYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
+       SYS_ACCESS                   = 33  // { int access(char *path, int amode); }
+       SYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }
+       SYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }
+       SYS_SYNC                     = 36  // { int sync(void); }
+       SYS_KILL                     = 37  // { int kill(int pid, int signum); }
+       SYS_GETPPID                  = 39  // { pid_t getppid(void); }
+       SYS_DUP                      = 41  // { int dup(u_int fd); }
+       SYS_GETEGID                  = 43  // { gid_t getegid(void); }
+       SYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
+       SYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }
+       SYS_GETGID                   = 47  // { gid_t getgid(void); }
+       SYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }
+       SYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }
+       SYS_ACCT                     = 51  // { int acct(char *path); }
+       SYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }
+       SYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }
+       SYS_REBOOT                   = 55  // { int reboot(int opt); }
+       SYS_REVOKE                   = 56  // { int revoke(char *path); }
+       SYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }
+       SYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }
+       SYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }
+       SYS_UMASK                    = 60  // { int umask(int newmask); }
+       SYS_CHROOT                   = 61  // { int chroot(char *path); }
+       SYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }
+       SYS_VFORK                    = 66  // { int vfork(void); }
+       SYS_SBRK                     = 69  // { int sbrk(int incr); }
+       SYS_SSTK                     = 70  // { int sstk(int incr); }
+       SYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }
+       SYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }
+       SYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }
+       SYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }
+       SYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }
+       SYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }
+       SYS_GETPGRP                  = 81  // { int getpgrp(void); }
+       SYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }
+       SYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
+       SYS_SWAPON                   = 85  // { int swapon(char *name); }
+       SYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }
+       SYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }
+       SYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }
+       SYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }
+       SYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+       SYS_FSYNC                    = 95  // { int fsync(int fd); }
+       SYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }
+       SYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }
+       SYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }
+       SYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }
+       SYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }
+       SYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
+       SYS_LISTEN                   = 106 // { int listen(int s, int backlog); }
+       SYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
+       SYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }
+       SYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
+       SYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
+       SYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
+       SYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
+       SYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }
+       SYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }
+       SYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }
+       SYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }
+       SYS_RENAME                   = 128 // { int rename(char *from, char *to); }
+       SYS_FLOCK                    = 131 // { int flock(int fd, int how); }
+       SYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }
+       SYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
+       SYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }
+       SYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
+       SYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }
+       SYS_RMDIR                    = 137 // { int rmdir(char *path); }
+       SYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }
+       SYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
+       SYS_SETSID                   = 147 // { int setsid(void); }
+       SYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
+       SYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }
+       SYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }
+       SYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }
+       SYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }
+       SYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }
+       SYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
+       SYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }
+       SYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }
+       SYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }
+       SYS_SETFIB                   = 175 // { int setfib(int fibnum); }
+       SYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }
+       SYS_SETGID                   = 181 // { int setgid(gid_t gid); }
+       SYS_SETEGID                  = 182 // { int setegid(gid_t egid); }
+       SYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }
+       SYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }
+       SYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }
+       SYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
+       SYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
+       SYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
+       SYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }
+       SYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }
+       SYS_UNDELETE                 = 205 // { int undelete(char *path); }
+       SYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }
+       SYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }
+       SYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
+       SYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }
+       SYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
+       SYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }
+       SYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+       SYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+       SYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
+       SYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }
+       SYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }
+       SYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
+       SYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
+       SYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
+       SYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
+       SYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }
+       SYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
+       SYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }
+       SYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }
+       SYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+       SYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
+       SYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
+       SYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
+       SYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
+       SYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
+       SYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
+       SYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }
+       SYS_RFORK                    = 251 // { int rfork(int flags); }
+       SYS_ISSETUGID                = 253 // { int issetugid(void); }
+       SYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }
+       SYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }
+       SYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }
+       SYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
+       SYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }
+       SYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }
+       SYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
+       SYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
+       SYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
+       SYS_MODNEXT                  = 300 // { int modnext(int modid); }
+       SYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }
+       SYS_MODFNEXT                 = 302 // { int modfnext(int modid); }
+       SYS_MODFIND                  = 303 // { int modfind(const char *name); }
+       SYS_KLDLOAD                  = 304 // { int kldload(const char *file); }
+       SYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }
+       SYS_KLDFIND                  = 306 // { int kldfind(const char *file); }
+       SYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }
+       SYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
+       SYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }
+       SYS_GETSID                   = 310 // { int getsid(pid_t pid); }
+       SYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+       SYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+       SYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
+       SYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
+       SYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
+       SYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }
+       SYS_YIELD                    = 321 // { int yield(void); }
+       SYS_MLOCKALL                 = 324 // { int mlockall(int how); }
+       SYS_MUNLOCKALL               = 325 // { int munlockall(void); }
+       SYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }
+       SYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
+       SYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
+       SYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
+       SYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }
+       SYS_SCHED_YIELD              = 331 // { int sched_yield (void); }
+       SYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }
+       SYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }
+       SYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
+       SYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }
+       SYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }
+       SYS_JAIL                     = 338 // { int jail(struct jail *jail); }
+       SYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
+       SYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }
+       SYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }
+       SYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }
+       SYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
+       SYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
+       SYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
+       SYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
+       SYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
+       SYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
+       SYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
+       SYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+       SYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+       SYS_KQUEUE                   = 362 // { int kqueue(void); }
+       SYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
+       SYS___SETUGID                = 374 // { int __setugid(int flag); }
+       SYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }
+       SYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }
+       SYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }
+       SYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }
+       SYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }
+       SYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }
+       SYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }
+       SYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }
+       SYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }
+       SYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }
+       SYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }
+       SYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
+       SYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
+       SYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }
+       SYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }
+       SYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }
+       SYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }
+       SYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }
+       SYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }
+       SYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }
+       SYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }
+       SYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }
+       SYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
+       SYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
+       SYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
+       SYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
+       SYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
+       SYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
+       SYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
+       SYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
+       SYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }
+       SYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }
+       SYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
+       SYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }
+       SYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }
+       SYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }
+       SYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }
+       SYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }
+       SYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }
+       SYS_THR_SELF                 = 432 // { int thr_self(long *id); }
+       SYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }
+       SYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }
+       SYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
+       SYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
+       SYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }
+       SYS_THR_WAKE                 = 443 // { int thr_wake(long id); }
+       SYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }
+       SYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }
+       SYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }
+       SYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }
+       SYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }
+       SYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }
+       SYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }
+       SYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
+       SYS_AUDITCTL                 = 453 // { int auditctl(char *path); }
+       SYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
+       SYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }
+       SYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
+       SYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
+       SYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
+       SYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
+       SYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
+       SYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }
+       SYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }
+       SYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }
+       SYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }
+       SYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }
+       SYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }
+       SYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
+       SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
+       SYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+       SYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
+       SYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
+       SYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
+       SYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }
+       SYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }
+       SYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }
+       SYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
+       SYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }
+       SYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }
+       SYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }
+       SYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }
+       SYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }
+       SYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }
+       SYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }
+       SYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }
+       SYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
+       SYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
+       SYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }
+       SYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
+       SYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
+       SYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
+       SYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
+       SYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
+       SYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
+       SYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
+       SYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }
+       SYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }
+       SYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }
+       SYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }
+       SYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }
+       SYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }
+       SYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }
+       SYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }
+       SYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
+       SYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+       SYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+       SYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }
+       SYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }
+       SYS_CAP_ENTER                = 516 // { int cap_enter(void); }
+       SYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }
+       SYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }
+       SYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }
+       SYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }
+       SYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }
+       SYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }
+       SYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }
+       SYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
+       SYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
+       SYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
+       SYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
+       SYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
+       SYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }
+       SYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }
+       SYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
+       SYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }
+       SYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }
+       SYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }
+       SYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }
+       SYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }
+       SYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }
+       SYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }
+       SYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }
+       SYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }
+       SYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }
+       SYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }
+       SYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }
+       SYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
+       SYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }
+       SYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
+       SYS_FDATASYNC                = 550 // { int fdatasync(int fd); }
+       SYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }
+       SYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
+       SYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
+       SYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
+       SYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }
+       SYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }
+       SYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
+       SYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
+       SYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
+       SYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+       SYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
+       SYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
+       SYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
+       SYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
+       SYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
+       SYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
+       SYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
+       SYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+       SYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
+)
index e443f9a322c86400757477130148daa791a2cc85..44a764c9917c1184f4baf2dee9cc1fbbf9f0c7f9 100644 (file)
@@ -85,8 +85,6 @@ const (
        SYS_SPLICE                  = 76
        SYS_TEE                     = 77
        SYS_READLINKAT              = 78
-       SYS_FSTATAT                 = 79
-       SYS_FSTAT                   = 80
        SYS_SYNC                    = 81
        SYS_FSYNC                   = 82
        SYS_FDATASYNC               = 83
index c3a5af8623b8bfd1572d52503093cf5c33797617..3a9c96b28820039df61a8cb7438b519bff2d8258 100644 (file)
@@ -309,6 +309,7 @@ const (
        SYS_LANDLOCK_CREATE_RULESET = 444
        SYS_LANDLOCK_ADD_RULE       = 445
        SYS_LANDLOCK_RESTRICT_SELF  = 446
+       SYS_MEMFD_SECRET            = 447
        SYS_PROCESS_MRELEASE        = 448
        SYS_FUTEX_WAITV             = 449
        SYS_SET_MEMPOLICY_HOME_NODE = 450
index 885842c0eb402751bd9eff281ca71516471aa527..e2a64f0991a00124f18fce599ca837fd28b9c588 100644 (file)
@@ -366,30 +366,57 @@ type ICMPv6Filter struct {
        Filt [8]uint32
 }
 
+type TCPConnectionInfo struct {
+       State               uint8
+       Snd_wscale          uint8
+       Rcv_wscale          uint8
+       _                   uint8
+       Options             uint32
+       Flags               uint32
+       Rto                 uint32
+       Maxseg              uint32
+       Snd_ssthresh        uint32
+       Snd_cwnd            uint32
+       Snd_wnd             uint32
+       Snd_sbbytes         uint32
+       Rcv_wnd             uint32
+       Rttcur              uint32
+       Srtt                uint32
+       Rttvar              uint32
+       Txpackets           uint64
+       Txbytes             uint64
+       Txretransmitbytes   uint64
+       Rxpackets           uint64
+       Rxbytes             uint64
+       Rxoutoforderbytes   uint64
+       Txretransmitpackets uint64
+}
+
 const (
-       SizeofSockaddrInet4    = 0x10
-       SizeofSockaddrInet6    = 0x1c
-       SizeofSockaddrAny      = 0x6c
-       SizeofSockaddrUnix     = 0x6a
-       SizeofSockaddrDatalink = 0x14
-       SizeofSockaddrCtl      = 0x20
-       SizeofSockaddrVM       = 0xc
-       SizeofXvsockpcb        = 0xa8
-       SizeofXSocket          = 0x64
-       SizeofXSockbuf         = 0x18
-       SizeofXVSockPgen       = 0x20
-       SizeofXucred           = 0x4c
-       SizeofLinger           = 0x8
-       SizeofIovec            = 0x10
-       SizeofIPMreq           = 0x8
-       SizeofIPMreqn          = 0xc
-       SizeofIPv6Mreq         = 0x14
-       SizeofMsghdr           = 0x30
-       SizeofCmsghdr          = 0xc
-       SizeofInet4Pktinfo     = 0xc
-       SizeofInet6Pktinfo     = 0x14
-       SizeofIPv6MTUInfo      = 0x20
-       SizeofICMPv6Filter     = 0x20
+       SizeofSockaddrInet4     = 0x10
+       SizeofSockaddrInet6     = 0x1c
+       SizeofSockaddrAny       = 0x6c
+       SizeofSockaddrUnix      = 0x6a
+       SizeofSockaddrDatalink  = 0x14
+       SizeofSockaddrCtl       = 0x20
+       SizeofSockaddrVM        = 0xc
+       SizeofXvsockpcb         = 0xa8
+       SizeofXSocket           = 0x64
+       SizeofXSockbuf          = 0x18
+       SizeofXVSockPgen        = 0x20
+       SizeofXucred            = 0x4c
+       SizeofLinger            = 0x8
+       SizeofIovec             = 0x10
+       SizeofIPMreq            = 0x8
+       SizeofIPMreqn           = 0xc
+       SizeofIPv6Mreq          = 0x14
+       SizeofMsghdr            = 0x30
+       SizeofCmsghdr           = 0xc
+       SizeofInet4Pktinfo      = 0xc
+       SizeofInet6Pktinfo      = 0x14
+       SizeofIPv6MTUInfo       = 0x20
+       SizeofICMPv6Filter      = 0x20
+       SizeofTCPConnectionInfo = 0x70
 )
 
 const (
index b23c02337db3d619930afe899c28e2df7855d697..34aa775219f04f9c014ca6fab2bf12ea880b401b 100644 (file)
@@ -366,30 +366,57 @@ type ICMPv6Filter struct {
        Filt [8]uint32
 }
 
+type TCPConnectionInfo struct {
+       State               uint8
+       Snd_wscale          uint8
+       Rcv_wscale          uint8
+       _                   uint8
+       Options             uint32
+       Flags               uint32
+       Rto                 uint32
+       Maxseg              uint32
+       Snd_ssthresh        uint32
+       Snd_cwnd            uint32
+       Snd_wnd             uint32
+       Snd_sbbytes         uint32
+       Rcv_wnd             uint32
+       Rttcur              uint32
+       Srtt                uint32
+       Rttvar              uint32
+       Txpackets           uint64
+       Txbytes             uint64
+       Txretransmitbytes   uint64
+       Rxpackets           uint64
+       Rxbytes             uint64
+       Rxoutoforderbytes   uint64
+       Txretransmitpackets uint64
+}
+
 const (
-       SizeofSockaddrInet4    = 0x10
-       SizeofSockaddrInet6    = 0x1c
-       SizeofSockaddrAny      = 0x6c
-       SizeofSockaddrUnix     = 0x6a
-       SizeofSockaddrDatalink = 0x14
-       SizeofSockaddrCtl      = 0x20
-       SizeofSockaddrVM       = 0xc
-       SizeofXvsockpcb        = 0xa8
-       SizeofXSocket          = 0x64
-       SizeofXSockbuf         = 0x18
-       SizeofXVSockPgen       = 0x20
-       SizeofXucred           = 0x4c
-       SizeofLinger           = 0x8
-       SizeofIovec            = 0x10
-       SizeofIPMreq           = 0x8
-       SizeofIPMreqn          = 0xc
-       SizeofIPv6Mreq         = 0x14
-       SizeofMsghdr           = 0x30
-       SizeofCmsghdr          = 0xc
-       SizeofInet4Pktinfo     = 0xc
-       SizeofInet6Pktinfo     = 0x14
-       SizeofIPv6MTUInfo      = 0x20
-       SizeofICMPv6Filter     = 0x20
+       SizeofSockaddrInet4     = 0x10
+       SizeofSockaddrInet6     = 0x1c
+       SizeofSockaddrAny       = 0x6c
+       SizeofSockaddrUnix      = 0x6a
+       SizeofSockaddrDatalink  = 0x14
+       SizeofSockaddrCtl       = 0x20
+       SizeofSockaddrVM        = 0xc
+       SizeofXvsockpcb         = 0xa8
+       SizeofXSocket           = 0x64
+       SizeofXSockbuf          = 0x18
+       SizeofXVSockPgen        = 0x20
+       SizeofXucred            = 0x4c
+       SizeofLinger            = 0x8
+       SizeofIovec             = 0x10
+       SizeofIPMreq            = 0x8
+       SizeofIPMreqn           = 0xc
+       SizeofIPv6Mreq          = 0x14
+       SizeofMsghdr            = 0x30
+       SizeofCmsghdr           = 0xc
+       SizeofInet4Pktinfo      = 0xc
+       SizeofInet6Pktinfo      = 0x14
+       SizeofIPv6MTUInfo       = 0x20
+       SizeofICMPv6Filter      = 0x20
+       SizeofTCPConnectionInfo = 0x70
 )
 
 const (
index 4eec078e52490863cf2ce9f794afffcd71a453e6..dea0c9a607d83ba6357e5685e34b44dee09be5c8 100644 (file)
@@ -90,27 +90,6 @@ type Stat_t struct {
        Spare   [10]uint64
 }
 
-type stat_freebsd11_t struct {
-       Dev     uint32
-       Ino     uint32
-       Mode    uint16
-       Nlink   uint16
-       Uid     uint32
-       Gid     uint32
-       Rdev    uint32
-       Atim    Timespec
-       Mtim    Timespec
-       Ctim    Timespec
-       Size    int64
-       Blocks  int64
-       Blksize int32
-       Flags   uint32
-       Gen     uint32
-       Lspare  int32
-       Btim    Timespec
-       _       [8]byte
-}
-
 type Statfs_t struct {
        Version     uint32
        Type        uint32
@@ -136,31 +115,6 @@ type Statfs_t struct {
        Mntonname   [1024]byte
 }
 
-type statfs_freebsd11_t struct {
-       Version     uint32
-       Type        uint32
-       Flags       uint64
-       Bsize       uint64
-       Iosize      uint64
-       Blocks      uint64
-       Bfree       uint64
-       Bavail      int64
-       Files       uint64
-       Ffree       int64
-       Syncwrites  uint64
-       Asyncwrites uint64
-       Syncreads   uint64
-       Asyncreads  uint64
-       Spare       [10]uint64
-       Namemax     uint32
-       Owner       uint32
-       Fsid        Fsid
-       Charspare   [80]int8
-       Fstypename  [16]byte
-       Mntfromname [88]byte
-       Mntonname   [88]byte
-}
-
 type Flock_t struct {
        Start  int64
        Len    int64
@@ -181,14 +135,6 @@ type Dirent struct {
        Name   [256]int8
 }
 
-type dirent_freebsd11 struct {
-       Fileno uint32
-       Reclen uint16
-       Type   uint8
-       Namlen uint8
-       Name   [256]int8
-}
-
 type Fsid struct {
        Val [2]int32
 }
@@ -337,41 +283,9 @@ const (
 )
 
 const (
-       PTRACE_ATTACH     = 0xa
-       PTRACE_CONT       = 0x7
-       PTRACE_DETACH     = 0xb
-       PTRACE_GETFPREGS  = 0x23
-       PTRACE_GETFSBASE  = 0x47
-       PTRACE_GETLWPLIST = 0xf
-       PTRACE_GETNUMLWPS = 0xe
-       PTRACE_GETREGS    = 0x21
-       PTRACE_GETXSTATE  = 0x45
-       PTRACE_IO         = 0xc
-       PTRACE_KILL       = 0x8
-       PTRACE_LWPEVENTS  = 0x18
-       PTRACE_LWPINFO    = 0xd
-       PTRACE_SETFPREGS  = 0x24
-       PTRACE_SETREGS    = 0x22
-       PTRACE_SINGLESTEP = 0x9
-       PTRACE_TRACEME    = 0x0
-)
-
-const (
-       PIOD_READ_D  = 0x1
-       PIOD_WRITE_D = 0x2
-       PIOD_READ_I  = 0x3
-       PIOD_WRITE_I = 0x4
-)
-
-const (
-       PL_FLAG_BORN   = 0x100
-       PL_FLAG_EXITED = 0x200
-       PL_FLAG_SI     = 0x20
-)
-
-const (
-       TRAP_BRKPT = 0x1
-       TRAP_TRACE = 0x2
+       PTRACE_TRACEME = 0x0
+       PTRACE_CONT    = 0x7
+       PTRACE_KILL    = 0x8
 )
 
 type PtraceLwpInfoStruct struct {
@@ -432,6 +346,8 @@ type FpReg struct {
        Pad   [64]uint8
 }
 
+type FpExtendedPrecision struct{}
+
 type PtraceIoDesc struct {
        Op   int32
        Offs *byte
@@ -444,8 +360,9 @@ type Kevent_t struct {
        Filter int16
        Flags  uint16
        Fflags uint32
-       Data   int32
+       Data   int64
        Udata  *byte
+       Ext    [4]uint64
 }
 
 type FdSet struct {
index 7622904a532f45f8ef0eb7d37c4dcad01fee1310..da0ea0d608a89431a8b6823419507a32248a74bf 100644 (file)
@@ -86,26 +86,6 @@ type Stat_t struct {
        Spare   [10]uint64
 }
 
-type stat_freebsd11_t struct {
-       Dev     uint32
-       Ino     uint32
-       Mode    uint16
-       Nlink   uint16
-       Uid     uint32
-       Gid     uint32
-       Rdev    uint32
-       Atim    Timespec
-       Mtim    Timespec
-       Ctim    Timespec
-       Size    int64
-       Blocks  int64
-       Blksize int32
-       Flags   uint32
-       Gen     uint32
-       Lspare  int32
-       Btim    Timespec
-}
-
 type Statfs_t struct {
        Version     uint32
        Type        uint32
@@ -131,31 +111,6 @@ type Statfs_t struct {
        Mntonname   [1024]byte
 }
 
-type statfs_freebsd11_t struct {
-       Version     uint32
-       Type        uint32
-       Flags       uint64
-       Bsize       uint64
-       Iosize      uint64
-       Blocks      uint64
-       Bfree       uint64
-       Bavail      int64
-       Files       uint64
-       Ffree       int64
-       Syncwrites  uint64
-       Asyncwrites uint64
-       Syncreads   uint64
-       Asyncreads  uint64
-       Spare       [10]uint64
-       Namemax     uint32
-       Owner       uint32
-       Fsid        Fsid
-       Charspare   [80]int8
-       Fstypename  [16]byte
-       Mntfromname [88]byte
-       Mntonname   [88]byte
-}
-
 type Flock_t struct {
        Start  int64
        Len    int64
@@ -177,14 +132,6 @@ type Dirent struct {
        Name   [256]int8
 }
 
-type dirent_freebsd11 struct {
-       Fileno uint32
-       Reclen uint16
-       Type   uint8
-       Namlen uint8
-       Name   [256]int8
-}
-
 type Fsid struct {
        Val [2]int32
 }
@@ -333,41 +280,9 @@ const (
 )
 
 const (
-       PTRACE_ATTACH     = 0xa
-       PTRACE_CONT       = 0x7
-       PTRACE_DETACH     = 0xb
-       PTRACE_GETFPREGS  = 0x23
-       PTRACE_GETFSBASE  = 0x47
-       PTRACE_GETLWPLIST = 0xf
-       PTRACE_GETNUMLWPS = 0xe
-       PTRACE_GETREGS    = 0x21
-       PTRACE_GETXSTATE  = 0x45
-       PTRACE_IO         = 0xc
-       PTRACE_KILL       = 0x8
-       PTRACE_LWPEVENTS  = 0x18
-       PTRACE_LWPINFO    = 0xd
-       PTRACE_SETFPREGS  = 0x24
-       PTRACE_SETREGS    = 0x22
-       PTRACE_SINGLESTEP = 0x9
-       PTRACE_TRACEME    = 0x0
-)
-
-const (
-       PIOD_READ_D  = 0x1
-       PIOD_WRITE_D = 0x2
-       PIOD_READ_I  = 0x3
-       PIOD_WRITE_I = 0x4
-)
-
-const (
-       PL_FLAG_BORN   = 0x100
-       PL_FLAG_EXITED = 0x200
-       PL_FLAG_SI     = 0x20
-)
-
-const (
-       TRAP_BRKPT = 0x1
-       TRAP_TRACE = 0x2
+       PTRACE_TRACEME = 0x0
+       PTRACE_CONT    = 0x7
+       PTRACE_KILL    = 0x8
 )
 
 type PtraceLwpInfoStruct struct {
@@ -435,6 +350,8 @@ type FpReg struct {
        Spare [12]uint64
 }
 
+type FpExtendedPrecision struct{}
+
 type PtraceIoDesc struct {
        Op   int32
        Offs *byte
@@ -449,6 +366,7 @@ type Kevent_t struct {
        Fflags uint32
        Data   int64
        Udata  *byte
+       Ext    [4]uint64
 }
 
 type FdSet struct {
index 19223ce8ecf906522e85e2c5f466f6d041897436..da8f7404509c06a159a34c46539159df0db3a526 100644 (file)
@@ -33,7 +33,7 @@ type Timeval struct {
        _    [4]byte
 }
 
-type Time_t int32
+type Time_t int64
 
 type Rusage struct {
        Utime    Timeval
@@ -88,26 +88,6 @@ type Stat_t struct {
        Spare   [10]uint64
 }
 
-type stat_freebsd11_t struct {
-       Dev     uint32
-       Ino     uint32
-       Mode    uint16
-       Nlink   uint16
-       Uid     uint32
-       Gid     uint32
-       Rdev    uint32
-       Atim    Timespec
-       Mtim    Timespec
-       Ctim    Timespec
-       Size    int64
-       Blocks  int64
-       Blksize int32
-       Flags   uint32
-       Gen     uint32
-       Lspare  int32
-       Btim    Timespec
-}
-
 type Statfs_t struct {
        Version     uint32
        Type        uint32
@@ -133,31 +113,6 @@ type Statfs_t struct {
        Mntonname   [1024]byte
 }
 
-type statfs_freebsd11_t struct {
-       Version     uint32
-       Type        uint32
-       Flags       uint64
-       Bsize       uint64
-       Iosize      uint64
-       Blocks      uint64
-       Bfree       uint64
-       Bavail      int64
-       Files       uint64
-       Ffree       int64
-       Syncwrites  uint64
-       Asyncwrites uint64
-       Syncreads   uint64
-       Asyncreads  uint64
-       Spare       [10]uint64
-       Namemax     uint32
-       Owner       uint32
-       Fsid        Fsid
-       Charspare   [80]int8
-       Fstypename  [16]byte
-       Mntfromname [88]byte
-       Mntonname   [88]byte
-}
-
 type Flock_t struct {
        Start  int64
        Len    int64
@@ -179,14 +134,6 @@ type Dirent struct {
        Name   [256]int8
 }
 
-type dirent_freebsd11 struct {
-       Fileno uint32
-       Reclen uint16
-       Type   uint8
-       Namlen uint8
-       Name   [256]int8
-}
-
 type Fsid struct {
        Val [2]int32
 }
@@ -335,41 +282,9 @@ const (
 )
 
 const (
-       PTRACE_ATTACH     = 0xa
-       PTRACE_CONT       = 0x7
-       PTRACE_DETACH     = 0xb
-       PTRACE_GETFPREGS  = 0x23
-       PTRACE_GETFSBASE  = 0x47
-       PTRACE_GETLWPLIST = 0xf
-       PTRACE_GETNUMLWPS = 0xe
-       PTRACE_GETREGS    = 0x21
-       PTRACE_GETXSTATE  = 0x45
-       PTRACE_IO         = 0xc
-       PTRACE_KILL       = 0x8
-       PTRACE_LWPEVENTS  = 0x18
-       PTRACE_LWPINFO    = 0xd
-       PTRACE_SETFPREGS  = 0x24
-       PTRACE_SETREGS    = 0x22
-       PTRACE_SINGLESTEP = 0x9
-       PTRACE_TRACEME    = 0x0
-)
-
-const (
-       PIOD_READ_D  = 0x1
-       PIOD_WRITE_D = 0x2
-       PIOD_READ_I  = 0x3
-       PIOD_WRITE_I = 0x4
-)
-
-const (
-       PL_FLAG_BORN   = 0x100
-       PL_FLAG_EXITED = 0x200
-       PL_FLAG_SI     = 0x20
-)
-
-const (
-       TRAP_BRKPT = 0x1
-       TRAP_TRACE = 0x2
+       PTRACE_TRACEME = 0x0
+       PTRACE_CONT    = 0x7
+       PTRACE_KILL    = 0x8
 )
 
 type PtraceLwpInfoStruct struct {
@@ -386,15 +301,15 @@ type PtraceLwpInfoStruct struct {
 }
 
 type __Siginfo struct {
-       Signo    int32
-       Errno    int32
-       Code     int32
-       Pid      int32
-       Uid      uint32
-       Status   int32
-       Addr     *byte
-       Value    [4]byte
-       X_reason [32]byte
+       Signo  int32
+       Errno  int32
+       Code   int32
+       Pid    int32
+       Uid    uint32
+       Status int32
+       Addr   *byte
+       Value  [4]byte
+       _      [32]byte
 }
 
 type Sigset_t struct {
@@ -402,16 +317,22 @@ type Sigset_t struct {
 }
 
 type Reg struct {
-       R      [13]uint32
-       R_sp   uint32
-       R_lr   uint32
-       R_pc   uint32
-       R_cpsr uint32
+       R    [13]uint32
+       Sp   uint32
+       Lr   uint32
+       Pc   uint32
+       Cpsr uint32
 }
 
 type FpReg struct {
-       Fpr_fpsr uint32
-       Fpr      [8][3]uint32
+       Fpsr uint32
+       Fpr  [8]FpExtendedPrecision
+}
+
+type FpExtendedPrecision struct {
+       Exponent    uint32
+       Mantissa_hi uint32
+       Mantissa_lo uint32
 }
 
 type PtraceIoDesc struct {
@@ -426,8 +347,11 @@ type Kevent_t struct {
        Filter int16
        Flags  uint16
        Fflags uint32
-       Data   int32
+       _      [4]byte
+       Data   int64
        Udata  *byte
+       _      [4]byte
+       Ext    [4]uint64
 }
 
 type FdSet struct {
@@ -453,7 +377,7 @@ type ifMsghdr struct {
        Addrs   int32
        Flags   int32
        Index   uint16
-       _       [2]byte
+       _       uint16
        Data    ifData
 }
 
@@ -464,7 +388,6 @@ type IfMsghdr struct {
        Addrs   int32
        Flags   int32
        Index   uint16
-       _       [2]byte
        Data    IfData
 }
 
@@ -532,7 +455,7 @@ type IfaMsghdr struct {
        Addrs   int32
        Flags   int32
        Index   uint16
-       _       [2]byte
+       _       uint16
        Metric  int32
 }
 
@@ -543,7 +466,7 @@ type IfmaMsghdr struct {
        Addrs   int32
        Flags   int32
        Index   uint16
-       _       [2]byte
+       _       uint16
 }
 
 type IfAnnounceMsghdr struct {
@@ -560,7 +483,7 @@ type RtMsghdr struct {
        Version uint8
        Type    uint8
        Index   uint16
-       _       [2]byte
+       _       uint16
        Flags   int32
        Addrs   int32
        Pid     int32
index 8e3e33f6790587e60208a6cf5f804f8005820320..d69988e5e58e978ed3464eda9f6759e362a16690 100644 (file)
@@ -86,26 +86,6 @@ type Stat_t struct {
        Spare   [10]uint64
 }
 
-type stat_freebsd11_t struct {
-       Dev     uint32
-       Ino     uint32
-       Mode    uint16
-       Nlink   uint16
-       Uid     uint32
-       Gid     uint32
-       Rdev    uint32
-       Atim    Timespec
-       Mtim    Timespec
-       Ctim    Timespec
-       Size    int64
-       Blocks  int64
-       Blksize int32
-       Flags   uint32
-       Gen     uint32
-       Lspare  int32
-       Btim    Timespec
-}
-
 type Statfs_t struct {
        Version     uint32
        Type        uint32
@@ -131,31 +111,6 @@ type Statfs_t struct {
        Mntonname   [1024]byte
 }
 
-type statfs_freebsd11_t struct {
-       Version     uint32
-       Type        uint32
-       Flags       uint64
-       Bsize       uint64
-       Iosize      uint64
-       Blocks      uint64
-       Bfree       uint64
-       Bavail      int64
-       Files       uint64
-       Ffree       int64
-       Syncwrites  uint64
-       Asyncwrites uint64
-       Syncreads   uint64
-       Asyncreads  uint64
-       Spare       [10]uint64
-       Namemax     uint32
-       Owner       uint32
-       Fsid        Fsid
-       Charspare   [80]int8
-       Fstypename  [16]byte
-       Mntfromname [88]byte
-       Mntonname   [88]byte
-}
-
 type Flock_t struct {
        Start  int64
        Len    int64
@@ -177,14 +132,6 @@ type Dirent struct {
        Name   [256]int8
 }
 
-type dirent_freebsd11 struct {
-       Fileno uint32
-       Reclen uint16
-       Type   uint8
-       Namlen uint8
-       Name   [256]int8
-}
-
 type Fsid struct {
        Val [2]int32
 }
@@ -333,39 +280,9 @@ const (
 )
 
 const (
-       PTRACE_ATTACH     = 0xa
-       PTRACE_CONT       = 0x7
-       PTRACE_DETACH     = 0xb
-       PTRACE_GETFPREGS  = 0x23
-       PTRACE_GETLWPLIST = 0xf
-       PTRACE_GETNUMLWPS = 0xe
-       PTRACE_GETREGS    = 0x21
-       PTRACE_IO         = 0xc
-       PTRACE_KILL       = 0x8
-       PTRACE_LWPEVENTS  = 0x18
-       PTRACE_LWPINFO    = 0xd
-       PTRACE_SETFPREGS  = 0x24
-       PTRACE_SETREGS    = 0x22
-       PTRACE_SINGLESTEP = 0x9
-       PTRACE_TRACEME    = 0x0
-)
-
-const (
-       PIOD_READ_D  = 0x1
-       PIOD_WRITE_D = 0x2
-       PIOD_READ_I  = 0x3
-       PIOD_WRITE_I = 0x4
-)
-
-const (
-       PL_FLAG_BORN   = 0x100
-       PL_FLAG_EXITED = 0x200
-       PL_FLAG_SI     = 0x20
-)
-
-const (
-       TRAP_BRKPT = 0x1
-       TRAP_TRACE = 0x2
+       PTRACE_TRACEME = 0x0
+       PTRACE_CONT    = 0x7
+       PTRACE_KILL    = 0x8
 )
 
 type PtraceLwpInfoStruct struct {
@@ -413,6 +330,8 @@ type FpReg struct {
        _  [8]byte
 }
 
+type FpExtendedPrecision struct{}
+
 type PtraceIoDesc struct {
        Op   int32
        Offs *byte
@@ -427,6 +346,7 @@ type Kevent_t struct {
        Fflags uint32
        Data   int64
        Udata  *byte
+       Ext    [4]uint64
 }
 
 type FdSet struct {
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
new file mode 100644 (file)
index 0000000..d6fd9e8
--- /dev/null
@@ -0,0 +1,626 @@
+// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && freebsd
+// +build riscv64,freebsd
+
+package unix
+
+const (
+       SizeofPtr      = 0x8
+       SizeofShort    = 0x2
+       SizeofInt      = 0x4
+       SizeofLong     = 0x8
+       SizeofLongLong = 0x8
+)
+
+type (
+       _C_short     int16
+       _C_int       int32
+       _C_long      int64
+       _C_long_long int64
+)
+
+type Timespec struct {
+       Sec  int64
+       Nsec int64
+}
+
+type Timeval struct {
+       Sec  int64
+       Usec int64
+}
+
+type Time_t int64
+
+type Rusage struct {
+       Utime    Timeval
+       Stime    Timeval
+       Maxrss   int64
+       Ixrss    int64
+       Idrss    int64
+       Isrss    int64
+       Minflt   int64
+       Majflt   int64
+       Nswap    int64
+       Inblock  int64
+       Oublock  int64
+       Msgsnd   int64
+       Msgrcv   int64
+       Nsignals int64
+       Nvcsw    int64
+       Nivcsw   int64
+}
+
+type Rlimit struct {
+       Cur int64
+       Max int64
+}
+
+type _Gid_t uint32
+
+const (
+       _statfsVersion = 0x20140518
+       _dirblksiz     = 0x400
+)
+
+type Stat_t struct {
+       Dev     uint64
+       Ino     uint64
+       Nlink   uint64
+       Mode    uint16
+       _0      int16
+       Uid     uint32
+       Gid     uint32
+       _1      int32
+       Rdev    uint64
+       Atim    Timespec
+       Mtim    Timespec
+       Ctim    Timespec
+       Btim    Timespec
+       Size    int64
+       Blocks  int64
+       Blksize int32
+       Flags   uint32
+       Gen     uint64
+       Spare   [10]uint64
+}
+
+type Statfs_t struct {
+       Version     uint32
+       Type        uint32
+       Flags       uint64
+       Bsize       uint64
+       Iosize      uint64
+       Blocks      uint64
+       Bfree       uint64
+       Bavail      int64
+       Files       uint64
+       Ffree       int64
+       Syncwrites  uint64
+       Asyncwrites uint64
+       Syncreads   uint64
+       Asyncreads  uint64
+       Spare       [10]uint64
+       Namemax     uint32
+       Owner       uint32
+       Fsid        Fsid
+       Charspare   [80]int8
+       Fstypename  [16]byte
+       Mntfromname [1024]byte
+       Mntonname   [1024]byte
+}
+
+type Flock_t struct {
+       Start  int64
+       Len    int64
+       Pid    int32
+       Type   int16
+       Whence int16
+       Sysid  int32
+       _      [4]byte
+}
+
+type Dirent struct {
+       Fileno uint64
+       Off    int64
+       Reclen uint16
+       Type   uint8
+       Pad0   uint8
+       Namlen uint16
+       Pad1   uint16
+       Name   [256]int8
+}
+
+type Fsid struct {
+       Val [2]int32
+}
+
+const (
+       PathMax = 0x400
+)
+
+const (
+       FADV_NORMAL     = 0x0
+       FADV_RANDOM     = 0x1
+       FADV_SEQUENTIAL = 0x2
+       FADV_WILLNEED   = 0x3
+       FADV_DONTNEED   = 0x4
+       FADV_NOREUSE    = 0x5
+)
+
+type RawSockaddrInet4 struct {
+       Len    uint8
+       Family uint8
+       Port   uint16
+       Addr   [4]byte /* in_addr */
+       Zero   [8]int8
+}
+
+type RawSockaddrInet6 struct {
+       Len      uint8
+       Family   uint8
+       Port     uint16
+       Flowinfo uint32
+       Addr     [16]byte /* in6_addr */
+       Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+       Len    uint8
+       Family uint8
+       Path   [104]int8
+}
+
+type RawSockaddrDatalink struct {
+       Len    uint8
+       Family uint8
+       Index  uint16
+       Type   uint8
+       Nlen   uint8
+       Alen   uint8
+       Slen   uint8
+       Data   [46]int8
+}
+
+type RawSockaddr struct {
+       Len    uint8
+       Family uint8
+       Data   [14]int8
+}
+
+type RawSockaddrAny struct {
+       Addr RawSockaddr
+       Pad  [92]int8
+}
+
+type _Socklen uint32
+
+type Xucred struct {
+       Version uint32
+       Uid     uint32
+       Ngroups int16
+       Groups  [16]uint32
+       _       *byte
+}
+
+type Linger struct {
+       Onoff  int32
+       Linger int32
+}
+
+type Iovec struct {
+       Base *byte
+       Len  uint64
+}
+
+type IPMreq struct {
+       Multiaddr [4]byte /* in_addr */
+       Interface [4]byte /* in_addr */
+}
+
+type IPMreqn struct {
+       Multiaddr [4]byte /* in_addr */
+       Address   [4]byte /* in_addr */
+       Ifindex   int32
+}
+
+type IPv6Mreq struct {
+       Multiaddr [16]byte /* in6_addr */
+       Interface uint32
+}
+
+type Msghdr struct {
+       Name       *byte
+       Namelen    uint32
+       Iov        *Iovec
+       Iovlen     int32
+       Control    *byte
+       Controllen uint32
+       Flags      int32
+}
+
+type Cmsghdr struct {
+       Len   uint32
+       Level int32
+       Type  int32
+}
+
+type Inet6Pktinfo struct {
+       Addr    [16]byte /* in6_addr */
+       Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+       Addr RawSockaddrInet6
+       Mtu  uint32
+}
+
+type ICMPv6Filter struct {
+       Filt [8]uint32
+}
+
+const (
+       SizeofSockaddrInet4    = 0x10
+       SizeofSockaddrInet6    = 0x1c
+       SizeofSockaddrAny      = 0x6c
+       SizeofSockaddrUnix     = 0x6a
+       SizeofSockaddrDatalink = 0x36
+       SizeofXucred           = 0x58
+       SizeofLinger           = 0x8
+       SizeofIovec            = 0x10
+       SizeofIPMreq           = 0x8
+       SizeofIPMreqn          = 0xc
+       SizeofIPv6Mreq         = 0x14
+       SizeofMsghdr           = 0x30
+       SizeofCmsghdr          = 0xc
+       SizeofInet6Pktinfo     = 0x14
+       SizeofIPv6MTUInfo      = 0x20
+       SizeofICMPv6Filter     = 0x20
+)
+
+const (
+       PTRACE_TRACEME = 0x0
+       PTRACE_CONT    = 0x7
+       PTRACE_KILL    = 0x8
+)
+
+type PtraceLwpInfoStruct struct {
+       Lwpid        int32
+       Event        int32
+       Flags        int32
+       Sigmask      Sigset_t
+       Siglist      Sigset_t
+       Siginfo      __Siginfo
+       Tdname       [20]int8
+       Child_pid    int32
+       Syscall_code uint32
+       Syscall_narg uint32
+}
+
+type __Siginfo struct {
+       Signo  int32
+       Errno  int32
+       Code   int32
+       Pid    int32
+       Uid    uint32
+       Status int32
+       Addr   *byte
+       Value  [8]byte
+       _      [40]byte
+}
+
+type Sigset_t struct {
+       Val [4]uint32
+}
+
+type Reg struct {
+       Ra      uint64
+       Sp      uint64
+       Gp      uint64
+       Tp      uint64
+       T       [7]uint64
+       S       [12]uint64
+       A       [8]uint64
+       Sepc    uint64
+       Sstatus uint64
+}
+
+type FpReg struct {
+       X    [32][2]uint64
+       Fcsr uint64
+}
+
+type FpExtendedPrecision struct{}
+
+type PtraceIoDesc struct {
+       Op   int32
+       Offs *byte
+       Addr *byte
+       Len  uint64
+}
+
+type Kevent_t struct {
+       Ident  uint64
+       Filter int16
+       Flags  uint16
+       Fflags uint32
+       Data   int64
+       Udata  *byte
+       Ext    [4]uint64
+}
+
+type FdSet struct {
+       Bits [16]uint64
+}
+
+const (
+       sizeofIfMsghdr         = 0xa8
+       SizeofIfMsghdr         = 0xa8
+       sizeofIfData           = 0x98
+       SizeofIfData           = 0x98
+       SizeofIfaMsghdr        = 0x14
+       SizeofIfmaMsghdr       = 0x10
+       SizeofIfAnnounceMsghdr = 0x18
+       SizeofRtMsghdr         = 0x98
+       SizeofRtMetrics        = 0x70
+)
+
+type ifMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Addrs   int32
+       Flags   int32
+       Index   uint16
+       _       uint16
+       Data    ifData
+}
+
+type IfMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Addrs   int32
+       Flags   int32
+       Index   uint16
+       Data    IfData
+}
+
+type ifData struct {
+       Type       uint8
+       Physical   uint8
+       Addrlen    uint8
+       Hdrlen     uint8
+       Link_state uint8
+       Vhid       uint8
+       Datalen    uint16
+       Mtu        uint32
+       Metric     uint32
+       Baudrate   uint64
+       Ipackets   uint64
+       Ierrors    uint64
+       Opackets   uint64
+       Oerrors    uint64
+       Collisions uint64
+       Ibytes     uint64
+       Obytes     uint64
+       Imcasts    uint64
+       Omcasts    uint64
+       Iqdrops    uint64
+       Oqdrops    uint64
+       Noproto    uint64
+       Hwassist   uint64
+       _          [8]byte
+       _          [16]byte
+}
+
+type IfData struct {
+       Type        uint8
+       Physical    uint8
+       Addrlen     uint8
+       Hdrlen      uint8
+       Link_state  uint8
+       Spare_char1 uint8
+       Spare_char2 uint8
+       Datalen     uint8
+       Mtu         uint64
+       Metric      uint64
+       Baudrate    uint64
+       Ipackets    uint64
+       Ierrors     uint64
+       Opackets    uint64
+       Oerrors     uint64
+       Collisions  uint64
+       Ibytes      uint64
+       Obytes      uint64
+       Imcasts     uint64
+       Omcasts     uint64
+       Iqdrops     uint64
+       Noproto     uint64
+       Hwassist    uint64
+       Epoch       int64
+       Lastchange  Timeval
+}
+
+type IfaMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Addrs   int32
+       Flags   int32
+       Index   uint16
+       _       uint16
+       Metric  int32
+}
+
+type IfmaMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Addrs   int32
+       Flags   int32
+       Index   uint16
+       _       uint16
+}
+
+type IfAnnounceMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Index   uint16
+       Name    [16]int8
+       What    uint16
+}
+
+type RtMsghdr struct {
+       Msglen  uint16
+       Version uint8
+       Type    uint8
+       Index   uint16
+       _       uint16
+       Flags   int32
+       Addrs   int32
+       Pid     int32
+       Seq     int32
+       Errno   int32
+       Fmask   int32
+       Inits   uint64
+       Rmx     RtMetrics
+}
+
+type RtMetrics struct {
+       Locks    uint64
+       Mtu      uint64
+       Hopcount uint64
+       Expire   uint64
+       Recvpipe uint64
+       Sendpipe uint64
+       Ssthresh uint64
+       Rtt      uint64
+       Rttvar   uint64
+       Pksent   uint64
+       Weight   uint64
+       Nhidx    uint64
+       Filler   [2]uint64
+}
+
+const (
+       SizeofBpfVersion    = 0x4
+       SizeofBpfStat       = 0x8
+       SizeofBpfZbuf       = 0x18
+       SizeofBpfProgram    = 0x10
+       SizeofBpfInsn       = 0x8
+       SizeofBpfHdr        = 0x20
+       SizeofBpfZbufHeader = 0x20
+)
+
+type BpfVersion struct {
+       Major uint16
+       Minor uint16
+}
+
+type BpfStat struct {
+       Recv uint32
+       Drop uint32
+}
+
+type BpfZbuf struct {
+       Bufa   *byte
+       Bufb   *byte
+       Buflen uint64
+}
+
+type BpfProgram struct {
+       Len   uint32
+       Insns *BpfInsn
+}
+
+type BpfInsn struct {
+       Code uint16
+       Jt   uint8
+       Jf   uint8
+       K    uint32
+}
+
+type BpfHdr struct {
+       Tstamp  Timeval
+       Caplen  uint32
+       Datalen uint32
+       Hdrlen  uint16
+       _       [6]byte
+}
+
+type BpfZbufHeader struct {
+       Kernel_gen uint32
+       Kernel_len uint32
+       User_gen   uint32
+       _          [5]uint32
+}
+
+type Termios struct {
+       Iflag  uint32
+       Oflag  uint32
+       Cflag  uint32
+       Lflag  uint32
+       Cc     [20]uint8
+       Ispeed uint32
+       Ospeed uint32
+}
+
+type Winsize struct {
+       Row    uint16
+       Col    uint16
+       Xpixel uint16
+       Ypixel uint16
+}
+
+const (
+       AT_FDCWD            = -0x64
+       AT_EACCESS          = 0x100
+       AT_SYMLINK_NOFOLLOW = 0x200
+       AT_SYMLINK_FOLLOW   = 0x400
+       AT_REMOVEDIR        = 0x800
+)
+
+type PollFd struct {
+       Fd      int32
+       Events  int16
+       Revents int16
+}
+
+const (
+       POLLERR      = 0x8
+       POLLHUP      = 0x10
+       POLLIN       = 0x1
+       POLLINIGNEOF = 0x2000
+       POLLNVAL     = 0x20
+       POLLOUT      = 0x4
+       POLLPRI      = 0x2
+       POLLRDBAND   = 0x80
+       POLLRDNORM   = 0x40
+       POLLWRBAND   = 0x100
+       POLLWRNORM   = 0x4
+)
+
+type CapRights struct {
+       Rights [2]uint64
+}
+
+type Utsname struct {
+       Sysname  [256]byte
+       Nodename [256]byte
+       Release  [256]byte
+       Version  [256]byte
+       Machine  [256]byte
+}
+
+const SizeofClockinfo = 0x14
+
+type Clockinfo struct {
+       Hz     int32
+       Tick   int32
+       Spare  int32
+       Stathz int32
+       Profhz int32
+}
index 9962d26bb30c9e36d9577459636dd5e4ac4ade74..f6de1eedbdf60549d65d5030939686697cbae28d 100644 (file)
@@ -945,6 +945,9 @@ type PerfEventAttr struct {
        Aux_watermark      uint32
        Sample_max_stack   uint16
        _                  uint16
+       Aux_sample_size    uint32
+       _                  uint32
+       Sig_data           uint64
 }
 
 type PerfEventMmapPage struct {
@@ -1127,7 +1130,9 @@ const (
        PERF_BR_SYSRET                        = 0x8
        PERF_BR_COND_CALL                     = 0x9
        PERF_BR_COND_RET                      = 0xa
-       PERF_BR_MAX                           = 0xb
+       PERF_BR_ERET                          = 0xb
+       PERF_BR_IRQ                           = 0xc
+       PERF_BR_MAX                           = 0xd
        PERF_SAMPLE_REGS_ABI_NONE             = 0x0
        PERF_SAMPLE_REGS_ABI_32               = 0x1
        PERF_SAMPLE_REGS_ABI_64               = 0x2
@@ -2969,7 +2974,7 @@ const (
        DEVLINK_CMD_TRAP_POLICER_NEW                       = 0x47
        DEVLINK_CMD_TRAP_POLICER_DEL                       = 0x48
        DEVLINK_CMD_HEALTH_REPORTER_TEST                   = 0x49
-       DEVLINK_CMD_MAX                                    = 0x4d
+       DEVLINK_CMD_MAX                                    = 0x51
        DEVLINK_PORT_TYPE_NOTSET                           = 0x0
        DEVLINK_PORT_TYPE_AUTO                             = 0x1
        DEVLINK_PORT_TYPE_ETH                              = 0x2
@@ -3198,7 +3203,7 @@ const (
        DEVLINK_ATTR_RATE_NODE_NAME                        = 0xa8
        DEVLINK_ATTR_RATE_PARENT_NODE_NAME                 = 0xa9
        DEVLINK_ATTR_REGION_MAX_SNAPSHOTS                  = 0xaa
-       DEVLINK_ATTR_MAX                                   = 0xaa
+       DEVLINK_ATTR_MAX                                   = 0xae
        DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE              = 0x0
        DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX           = 0x1
        DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT               = 0x0
@@ -3638,7 +3643,11 @@ const (
        ETHTOOL_A_RINGS_RX_MINI                   = 0x7
        ETHTOOL_A_RINGS_RX_JUMBO                  = 0x8
        ETHTOOL_A_RINGS_TX                        = 0x9
-       ETHTOOL_A_RINGS_MAX                       = 0xa
+       ETHTOOL_A_RINGS_RX_BUF_LEN                = 0xa
+       ETHTOOL_A_RINGS_TCP_DATA_SPLIT            = 0xb
+       ETHTOOL_A_RINGS_CQE_SIZE                  = 0xc
+       ETHTOOL_A_RINGS_TX_PUSH                   = 0xd
+       ETHTOOL_A_RINGS_MAX                       = 0xd
        ETHTOOL_A_CHANNELS_UNSPEC                 = 0x0
        ETHTOOL_A_CHANNELS_HEADER                 = 0x1
        ETHTOOL_A_CHANNELS_RX_MAX                 = 0x2
@@ -4323,7 +4332,7 @@ const (
        NL80211_ATTR_MAC_HINT                                   = 0xc8
        NL80211_ATTR_MAC_MASK                                   = 0xd7
        NL80211_ATTR_MAX_AP_ASSOC_STA                           = 0xca
-       NL80211_ATTR_MAX                                        = 0x135
+       NL80211_ATTR_MAX                                        = 0x137
        NL80211_ATTR_MAX_CRIT_PROT_DURATION                     = 0xb4
        NL80211_ATTR_MAX_CSA_COUNTERS                           = 0xce
        NL80211_ATTR_MAX_MATCH_SETS                             = 0x85
@@ -4549,7 +4558,7 @@ const (
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY                     = 0x3
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE                     = 0x5
        NL80211_BAND_IFTYPE_ATTR_IFTYPES                        = 0x1
-       NL80211_BAND_IFTYPE_ATTR_MAX                            = 0x7
+       NL80211_BAND_IFTYPE_ATTR_MAX                            = 0xb
        NL80211_BAND_S1GHZ                                      = 0x4
        NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE                 = 0x2
        NL80211_BITRATE_ATTR_MAX                                = 0x2
@@ -4887,7 +4896,7 @@ const (
        NL80211_FREQUENCY_ATTR_GO_CONCURRENT                    = 0xf
        NL80211_FREQUENCY_ATTR_INDOOR_ONLY                      = 0xe
        NL80211_FREQUENCY_ATTR_IR_CONCURRENT                    = 0xf
-       NL80211_FREQUENCY_ATTR_MAX                              = 0x19
+       NL80211_FREQUENCY_ATTR_MAX                              = 0x1b
        NL80211_FREQUENCY_ATTR_MAX_TX_POWER                     = 0x6
        NL80211_FREQUENCY_ATTR_NO_10MHZ                         = 0x11
        NL80211_FREQUENCY_ATTR_NO_160MHZ                        = 0xc
@@ -5254,7 +5263,7 @@ const (
        NL80211_RATE_INFO_HE_RU_ALLOC_52                        = 0x1
        NL80211_RATE_INFO_HE_RU_ALLOC_996                       = 0x5
        NL80211_RATE_INFO_HE_RU_ALLOC                           = 0x11
-       NL80211_RATE_INFO_MAX                                   = 0x11
+       NL80211_RATE_INFO_MAX                                   = 0x16
        NL80211_RATE_INFO_MCS                                   = 0x2
        NL80211_RATE_INFO_SHORT_GI                              = 0x4
        NL80211_RATE_INFO_VHT_MCS                               = 0x6
@@ -5588,3 +5597,8 @@ const (
        FR_ACT_UNREACHABLE     = 0x7
        FR_ACT_PROHIBIT        = 0x8
 )
+
+const (
+       AUDIT_NLGRP_NONE    = 0x0
+       AUDIT_NLGRP_READLOG = 0x1
+)
index 4948362f2c2242c58605cfc8436844c69d43df78..7551af4831817e4da15251ad40704972fa4cb75e 100644 (file)
@@ -324,6 +324,13 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       _                         [4]byte
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint32
index f64345e0e2f3a4a1f910402a6fb5d4a215ccf630..3e738ac0bbf523542c0b627106cddbe7f473f8bb 100644 (file)
@@ -338,6 +338,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 72469c79e7500ff2ec493860f1e81351e4b64d78..6183eef4a40b251e33cb9b6cd6bd8da5d5561120 100644 (file)
@@ -315,6 +315,13 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       _                         [4]byte
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint32
index 68f072283a07bb6ac32fb454a39c682a7612ca52..968cecb17e885ac8599924ee2b64c733e4bec8b4 100644 (file)
@@ -317,6 +317,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 090ae46c6757ede1c8ef196c1f22aa1246257f68..8fe4c522a9cc4fe855017d491497366da5bf4050 100644 (file)
@@ -318,6 +318,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 03604cca135a55054ecbc65cf68ddd56d1413c16..11426a3010b59bde3f3d3b730780beb1238c8fd5 100644 (file)
@@ -320,6 +320,13 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       _                         [4]byte
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint32
index fe57a7b26539d604bad3e154cf7717c03925ec63..ad1c3b3de59789aecebf4f8d59ec99d51bc64d59 100644 (file)
@@ -320,6 +320,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 3f0db4da81e7a8588761227b10b3fd34e8c41d19..15fd84e4dd06cfd1a4e6d67882bec12b36606219 100644 (file)
@@ -320,6 +320,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 70ecd3b239f871eec15543da700ce6f761502b49..49c49825ab32cbf6ea9e017730dfb965bb563e4f 100644 (file)
@@ -320,6 +320,13 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       _                         [4]byte
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint32
index 4e700120db906c846fed42be1d08618669456b71..cd36d0da26a87cbb0c60df94c7e00607b78eea53 100644 (file)
@@ -327,6 +327,13 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       _                         [4]byte
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint32
index 34a57c69928d520dadc7f4f53cca2c887aa58294..8c6fce039501447994d1522ed52a3c48cc6bb784 100644 (file)
@@ -327,6 +327,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index 6b84a47296f6713e76b7155e1937df811fb6f861..20910f2ad78c663be344e8127aba7571ca9e8799 100644 (file)
@@ -327,6 +327,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index c4a305fe2e7d606d33c8f2fc6b8d92fcc8e3fe2d..71b7b3331db7e82d4fa155932af886056a94c219 100644 (file)
@@ -345,6 +345,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index a1f1e4c9e18bc5191135de1893c6c6ff7f7fe2e0..71184cc2cda8ca8427304753c05063b3995abf91 100644 (file)
@@ -340,6 +340,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index df95ebf3a1b6ac996fd794a2e8972b8d75f798c4..06156285d9e7ee2409eae8121e9a5e3660f5a91b 100644 (file)
@@ -322,6 +322,12 @@ type Taskstats struct {
        Ac_btime64                uint64
        Compact_count             uint64
        Compact_delay_total       uint64
+       Ac_tgid                   uint32
+       Ac_tgetime                uint64
+       Ac_exe_dev                uint64
+       Ac_exe_inode              uint64
+       Wpcopy_count              uint64
+       Wpcopy_delay_total        uint64
 }
 
 type cpuMask uint64
index ad4aad27968699379e0961876f91342d35d2b1d8..c1a9b83ad5e06b3f088f3a8b34704985d16ef45d 100644 (file)
@@ -178,7 +178,7 @@ type Linger struct {
 }
 
 type Iovec struct {
-       Base *int8
+       Base *byte
        Len  uint64
 }
 
index 636e5de60e32f483da0ec6edb7a2dd82fb64d47c..e27913817a71c9c81cab7c7ea4f73fd101cb725f 100644 (file)
@@ -417,6 +417,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys  GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
 //sys  GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
 //sys  GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
+//sys   QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) = psapi.QueryWorkingSetEx
 
 // NT Native APIs
 //sys  rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
@@ -861,6 +862,7 @@ const socket_error = uintptr(^uint32(0))
 //sys  GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
 //sys  GetACP() (acp uint32) = kernel32.GetACP
 //sys  MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
+//sys  getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
 
 // For testing: clients can set this flag to force
 // creation of IPv6 sockets to return EAFNOSUPPORT.
@@ -970,6 +972,32 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {
        return unsafe.Pointer(&sa.raw), sl, nil
 }
 
+type RawSockaddrBth struct {
+       AddressFamily  [2]byte
+       BtAddr         [8]byte
+       ServiceClassId [16]byte
+       Port           [4]byte
+}
+
+type SockaddrBth struct {
+       BtAddr         uint64
+       ServiceClassId GUID
+       Port           uint32
+
+       raw RawSockaddrBth
+}
+
+func (sa *SockaddrBth) sockaddr() (unsafe.Pointer, int32, error) {
+       family := AF_BTH
+       sa.raw = RawSockaddrBth{
+               AddressFamily:  *(*[2]byte)(unsafe.Pointer(&family)),
+               BtAddr:         *(*[8]byte)(unsafe.Pointer(&sa.BtAddr)),
+               Port:           *(*[4]byte)(unsafe.Pointer(&sa.Port)),
+               ServiceClassId: *(*[16]byte)(unsafe.Pointer(&sa.ServiceClassId)),
+       }
+       return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
+}
+
 func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
        switch rsa.Addr.Family {
        case AF_UNIX:
@@ -1045,6 +1073,14 @@ func Connect(fd Handle, sa Sockaddr) (err error) {
        return connect(fd, ptr, n)
 }
 
+func GetBestInterfaceEx(sa Sockaddr, pdwBestIfIndex *uint32) (err error) {
+       ptr, _, err := sa.sockaddr()
+       if err != nil {
+               return err
+       }
+       return getBestInterfaceEx(ptr, pdwBestIfIndex)
+}
+
 func Getsockname(fd Handle) (sa Sockaddr, err error) {
        var rsa RawSockaddrAny
        l := int32(unsafe.Sizeof(rsa))
@@ -1698,3 +1734,71 @@ func LoadResourceData(module, resInfo Handle) (data []byte, err error) {
        h.Cap = int(size)
        return
 }
+
+// PSAPI_WORKING_SET_EX_BLOCK contains extended working set information for a page.
+type PSAPI_WORKING_SET_EX_BLOCK uint64
+
+// Valid returns the validity of this page.
+// If this bit is 1, the subsequent members are valid; otherwise they should be ignored.
+func (b PSAPI_WORKING_SET_EX_BLOCK) Valid() bool {
+       return (b & 1) == 1
+}
+
+// ShareCount is the number of processes that share this page. The maximum value of this member is 7.
+func (b PSAPI_WORKING_SET_EX_BLOCK) ShareCount() uint64 {
+       return b.intField(1, 3)
+}
+
+// Win32Protection is the memory protection attributes of the page. For a list of values, see
+// https://docs.microsoft.com/en-us/windows/win32/memory/memory-protection-constants
+func (b PSAPI_WORKING_SET_EX_BLOCK) Win32Protection() uint64 {
+       return b.intField(4, 11)
+}
+
+// Shared returns the shared status of this page.
+// If this bit is 1, the page can be shared.
+func (b PSAPI_WORKING_SET_EX_BLOCK) Shared() bool {
+       return (b & (1 << 15)) == 1
+}
+
+// Node is the NUMA node. The maximum value of this member is 63.
+func (b PSAPI_WORKING_SET_EX_BLOCK) Node() uint64 {
+       return b.intField(16, 6)
+}
+
+// Locked returns the locked status of this page.
+// If this bit is 1, the virtual page is locked in physical memory.
+func (b PSAPI_WORKING_SET_EX_BLOCK) Locked() bool {
+       return (b & (1 << 22)) == 1
+}
+
+// LargePage returns the large page status of this page.
+// If this bit is 1, the page is a large page.
+func (b PSAPI_WORKING_SET_EX_BLOCK) LargePage() bool {
+       return (b & (1 << 23)) == 1
+}
+
+// Bad returns the bad status of this page.
+// If this bit is 1, the page is has been reported as bad.
+func (b PSAPI_WORKING_SET_EX_BLOCK) Bad() bool {
+       return (b & (1 << 31)) == 1
+}
+
+// intField extracts an integer field in the PSAPI_WORKING_SET_EX_BLOCK union.
+func (b PSAPI_WORKING_SET_EX_BLOCK) intField(start, length int) uint64 {
+       var mask PSAPI_WORKING_SET_EX_BLOCK
+       for pos := start; pos < start+length; pos++ {
+               mask |= (1 << pos)
+       }
+
+       masked := b & mask
+       return uint64(masked >> start)
+}
+
+// PSAPI_WORKING_SET_EX_INFORMATION contains extended working set information for a process.
+type PSAPI_WORKING_SET_EX_INFORMATION struct {
+       // The virtual address.
+       VirtualAddress Pointer
+       // A PSAPI_WORKING_SET_EX_BLOCK union that indicates the attributes of the page at VirtualAddress.
+       VirtualAttributes PSAPI_WORKING_SET_EX_BLOCK
+}
index e19471c6a852fa58e91d9d288ce8231f4b83a065..f9eaca528ed7d6c48f759e4c869fcb06879167b0 100644 (file)
@@ -160,6 +160,10 @@ const (
 
        MAX_COMPUTERNAME_LENGTH = 15
 
+       MAX_DHCPV6_DUID_LENGTH = 130
+
+       MAX_DNS_SUFFIX_STRING_LENGTH = 256
+
        TIME_ZONE_ID_UNKNOWN  = 0
        TIME_ZONE_ID_STANDARD = 1
 
@@ -2000,27 +2004,62 @@ type IpAdapterPrefix struct {
 }
 
 type IpAdapterAddresses struct {
-       Length                uint32
-       IfIndex               uint32
-       Next                  *IpAdapterAddresses
-       AdapterName           *byte
-       FirstUnicastAddress   *IpAdapterUnicastAddress
-       FirstAnycastAddress   *IpAdapterAnycastAddress
-       FirstMulticastAddress *IpAdapterMulticastAddress
-       FirstDnsServerAddress *IpAdapterDnsServerAdapter
-       DnsSuffix             *uint16
-       Description           *uint16
-       FriendlyName          *uint16
-       PhysicalAddress       [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
-       PhysicalAddressLength uint32
-       Flags                 uint32
-       Mtu                   uint32
-       IfType                uint32
-       OperStatus            uint32
-       Ipv6IfIndex           uint32
-       ZoneIndices           [16]uint32
-       FirstPrefix           *IpAdapterPrefix
-       /* more fields might be present here. */
+       Length                 uint32
+       IfIndex                uint32
+       Next                   *IpAdapterAddresses
+       AdapterName            *byte
+       FirstUnicastAddress    *IpAdapterUnicastAddress
+       FirstAnycastAddress    *IpAdapterAnycastAddress
+       FirstMulticastAddress  *IpAdapterMulticastAddress
+       FirstDnsServerAddress  *IpAdapterDnsServerAdapter
+       DnsSuffix              *uint16
+       Description            *uint16
+       FriendlyName           *uint16
+       PhysicalAddress        [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
+       PhysicalAddressLength  uint32
+       Flags                  uint32
+       Mtu                    uint32
+       IfType                 uint32
+       OperStatus             uint32
+       Ipv6IfIndex            uint32
+       ZoneIndices            [16]uint32
+       FirstPrefix            *IpAdapterPrefix
+       TransmitLinkSpeed      uint64
+       ReceiveLinkSpeed       uint64
+       FirstWinsServerAddress *IpAdapterWinsServerAddress
+       FirstGatewayAddress    *IpAdapterGatewayAddress
+       Ipv4Metric             uint32
+       Ipv6Metric             uint32
+       Luid                   uint64
+       Dhcpv4Server           SocketAddress
+       CompartmentId          uint32
+       NetworkGuid            GUID
+       ConnectionType         uint32
+       TunnelType             uint32
+       Dhcpv6Server           SocketAddress
+       Dhcpv6ClientDuid       [MAX_DHCPV6_DUID_LENGTH]byte
+       Dhcpv6ClientDuidLength uint32
+       Dhcpv6Iaid             uint32
+       FirstDnsSuffix         *IpAdapterDNSSuffix
+}
+
+type IpAdapterWinsServerAddress struct {
+       Length   uint32
+       Reserved uint32
+       Next     *IpAdapterWinsServerAddress
+       Address  SocketAddress
+}
+
+type IpAdapterGatewayAddress struct {
+       Length   uint32
+       Reserved uint32
+       Next     *IpAdapterGatewayAddress
+       Address  SocketAddress
+}
+
+type IpAdapterDNSSuffix struct {
+       Next   *IpAdapterDNSSuffix
+       String [MAX_DNS_SUFFIX_STRING_LENGTH]uint16
 }
 
 const (
index 68f52c1e61e9e7aaaae7324c94d83e972b888768..52d4742cb9407012b6247258bb8292437798b99f 100644 (file)
@@ -177,6 +177,7 @@ var (
        procDnsRecordListFree                                    = moddnsapi.NewProc("DnsRecordListFree")
        procGetAdaptersAddresses                                 = modiphlpapi.NewProc("GetAdaptersAddresses")
        procGetAdaptersInfo                                      = modiphlpapi.NewProc("GetAdaptersInfo")
+       procGetBestInterfaceEx                                   = modiphlpapi.NewProc("GetBestInterfaceEx")
        procGetIfEntry                                           = modiphlpapi.NewProc("GetIfEntry")
        procAssignProcessToJobObject                             = modkernel32.NewProc("AssignProcessToJobObject")
        procCancelIo                                             = modkernel32.NewProc("CancelIo")
@@ -407,6 +408,7 @@ var (
        procGetModuleBaseNameW                                   = modpsapi.NewProc("GetModuleBaseNameW")
        procGetModuleFileNameExW                                 = modpsapi.NewProc("GetModuleFileNameExW")
        procGetModuleInformation                                 = modpsapi.NewProc("GetModuleInformation")
+       procQueryWorkingSetEx                                    = modpsapi.NewProc("QueryWorkingSetEx")
        procSubscribeServiceChangeNotifications                  = modsechost.NewProc("SubscribeServiceChangeNotifications")
        procUnsubscribeServiceChangeNotifications                = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
        procGetUserNameExW                                       = modsecur32.NewProc("GetUserNameExW")
@@ -1539,6 +1541,14 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
        return
 }
 
+func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {
+       r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0)
+       if r0 != 0 {
+               errcode = syscall.Errno(r0)
+       }
+       return
+}
+
 func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
        r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
        if r0 != 0 {
@@ -3495,6 +3505,14 @@ func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb
        return
 }
 
+func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb))
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
        ret = procSubscribeServiceChangeNotifications.Find()
        if ret != nil {
diff --git a/src/cmd/vendor/golang.org/x/term/AUTHORS b/src/cmd/vendor/golang.org/x/term/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/term/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/term/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
index 535ab8257c415b552ab6aa92bcd7e196e783dbf2..4b48a5899d1f87023fe721817f7e56dae1d60793 100644 (file)
@@ -935,7 +935,7 @@ func (s *stRingBuffer) Add(a string) {
 // next most recent, and so on. If such an element doesn't exist then ok is
 // false.
 func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
-       if n >= s.size {
+       if n < 0 || n >= s.size {
                return "", false
        }
        index := s.head - n
diff --git a/src/cmd/vendor/golang.org/x/tools/AUTHORS b/src/cmd/vendor/golang.org/x/tools/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/cmd/vendor/golang.org/x/tools/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/tools/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
index 7679bda435989edcbb01b0a0f256ecbc6a46b5ae..03c31525e36bec481224606d27c3d67070668de5 100644 (file)
@@ -241,6 +241,9 @@ Consequently, Facts must be serializable. The API requires that drivers
 use the gob encoding, an efficient, robust, self-describing binary
 protocol. A fact type may implement the GobEncoder/GobDecoder interfaces
 if the default encoding is unsuitable. Facts should be stateless.
+Because serialized facts may appear within build outputs, the gob encoding
+of a fact must be deterministic, to avoid spurious cache misses in
+build systems that use content-addressable caches.
 
 The Pass type has functions to import and export facts,
 associated either with an object or with a package:
index d3670aca97a335d5f2adb58c0f936dab79acf7e1..64e184d343927fb0b450ab3ef44f41ef586da190 100644 (file)
@@ -7,6 +7,7 @@
 package composite
 
 import (
+       "fmt"
        "go/ast"
        "go/types"
        "strings"
@@ -83,7 +84,8 @@ func run(pass *analysis.Pass) (interface{}, error) {
                }
                for _, typ := range structuralTypes {
                        under := deref(typ.Underlying())
-                       if _, ok := under.(*types.Struct); !ok {
+                       strct, ok := under.(*types.Struct)
+                       if !ok {
                                // skip non-struct composite literals
                                continue
                        }
@@ -92,20 +94,47 @@ func run(pass *analysis.Pass) (interface{}, error) {
                                continue
                        }
 
-                       // check if the CompositeLit contains an unkeyed field
+                       // check if the struct contains an unkeyed field
                        allKeyValue := true
-                       for _, e := range cl.Elts {
+                       var suggestedFixAvailable = len(cl.Elts) == strct.NumFields()
+                       var missingKeys []analysis.TextEdit
+                       for i, e := range cl.Elts {
                                if _, ok := e.(*ast.KeyValueExpr); !ok {
                                        allKeyValue = false
-                                       break
+                                       if i >= strct.NumFields() {
+                                               break
+                                       }
+                                       field := strct.Field(i)
+                                       if !field.Exported() {
+                                               // Adding unexported field names for structs not defined
+                                               // locally will not work.
+                                               suggestedFixAvailable = false
+                                               break
+                                       }
+                                       missingKeys = append(missingKeys, analysis.TextEdit{
+                                               Pos:     e.Pos(),
+                                               End:     e.Pos(),
+                                               NewText: []byte(fmt.Sprintf("%s: ", field.Name())),
+                                       })
                                }
                        }
                        if allKeyValue {
-                               // all the composite literal fields are keyed
+                               // all the struct fields are keyed
                                continue
                        }
 
-                       pass.ReportRangef(cl, "%s composite literal uses unkeyed fields", typeName)
+                       diag := analysis.Diagnostic{
+                               Pos:     cl.Pos(),
+                               End:     cl.End(),
+                               Message: fmt.Sprintf("%s struct literal uses unkeyed fields", typeName),
+                       }
+                       if suggestedFixAvailable {
+                               diag.SuggestedFixes = []analysis.SuggestedFix{{
+                                       Message:   "Add field names to struct literal",
+                                       TextEdits: missingKeys,
+                               }}
+                       }
+                       pass.Report(diag)
                        return
                }
        })
index 56b20ebd519a1a0c0afc8c0cf5ba76fb66d7e28f..cab2fa20fa5f9aeb761e4f5c9b4bd2970213d795 100644 (file)
@@ -475,10 +475,12 @@ func checkTest(pass *analysis.Pass, fn *ast.FuncDecl, prefix string) {
        if tparams := typeparams.ForFuncType(fn.Type); tparams != nil && len(tparams.List) > 0 {
                // Note: cmd/go/internal/load also errors about TestXXX and BenchmarkXXX functions with type parameters.
                // We have currently decided to also warn before compilation/package loading. This can help users in IDEs.
+               // TODO(adonovan): use ReportRangef(tparams).
                pass.Reportf(fn.Pos(), "%s has type parameters: it will not be run by go test as a %sXXX function", fn.Name.Name, prefix)
        }
 
        if !isTestSuffix(fn.Name.Name[len(prefix):]) {
+               // TODO(adonovan): use ReportRangef(fn.Name).
                pass.Reportf(fn.Pos(), "%s has malformed name: first letter after '%s' must not be lowercase", fn.Name.Name, prefix)
        }
 }
index 1d8c401939efec6374ead245c95d3c68783009f9..9fa5aa192c297bb702169d3977da696436d33902 100644 (file)
@@ -54,11 +54,11 @@ import (
 // interior whitespace of the assignment.  E is considered interior
 // whitespace of the BlockStmt containing the assignment.
 //
-// Precondition: [start, end) both lie within the same file as root.
-// TODO(adonovan): return (nil, false) in this case and remove precond.
-// Requires FileSet; see loader.tokenFileContainsPos.
-//
-// Postcondition: path is never nil; it always contains at least 'root'.
+// The resulting path is never empty; it always contains at least the
+// 'root' *ast.File.  Ideally PathEnclosingInterval would reject
+// intervals that lie wholly or partially outside the range of the
+// file, but unfortunately ast.File records only the token.Pos of
+// the 'package' keyword, but not of the start of the file itself.
 func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) {
        // fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging
 
@@ -134,6 +134,7 @@ func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Nod
                return false // inexact: overlaps multiple children
        }
 
+       // Ensure [start,end) is nondecreasing.
        if start > end {
                start, end = end, start
        }
index 78ee2c06bea3cdd6a4ce944129e9db474dc1739f..e32152ac223350a53cc50e9ba458dc6b7fed6b61 100644 (file)
@@ -11,10 +11,7 @@ import (
        "go/ast"
        "go/token"
        "go/types"
-       "strings"
-
-       "golang.org/x/tools/go/ast/astutil"
-       "golang.org/x/tools/internal/lsp/fuzzy"
+       "strconv"
 )
 
 // Flag to gate diagnostics for fuzz tests in 1.18.
@@ -37,7 +34,7 @@ func TypeErrorEndPos(fset *token.FileSet, src []byte, start token.Pos) token.Pos
        return end
 }
 
-func ZeroValue(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
+func ZeroValue(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
        under := typ
        if n, ok := typ.(*types.Named); ok {
                under = n.Underlying()
@@ -57,7 +54,7 @@ func ZeroValue(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.T
        case *types.Chan, *types.Interface, *types.Map, *types.Pointer, *types.Signature, *types.Slice, *types.Array:
                return ast.NewIdent("nil")
        case *types.Struct:
-               texpr := TypeExpr(fset, f, pkg, typ) // typ because we want the name here.
+               texpr := TypeExpr(f, pkg, typ) // typ because we want the name here.
                if texpr == nil {
                        return nil
                }
@@ -81,7 +78,7 @@ func IsZeroValue(expr ast.Expr) bool {
        }
 }
 
-func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
+func TypeExpr(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
        switch t := typ.(type) {
        case *types.Basic:
                switch t.Kind() {
@@ -91,7 +88,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                        return ast.NewIdent(t.Name())
                }
        case *types.Pointer:
-               x := TypeExpr(fset, f, pkg, t.Elem())
+               x := TypeExpr(f, pkg, t.Elem())
                if x == nil {
                        return nil
                }
@@ -100,7 +97,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                        X:  x,
                }
        case *types.Array:
-               elt := TypeExpr(fset, f, pkg, t.Elem())
+               elt := TypeExpr(f, pkg, t.Elem())
                if elt == nil {
                        return nil
                }
@@ -112,7 +109,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                        Elt: elt,
                }
        case *types.Slice:
-               elt := TypeExpr(fset, f, pkg, t.Elem())
+               elt := TypeExpr(f, pkg, t.Elem())
                if elt == nil {
                        return nil
                }
@@ -120,8 +117,8 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                        Elt: elt,
                }
        case *types.Map:
-               key := TypeExpr(fset, f, pkg, t.Key())
-               value := TypeExpr(fset, f, pkg, t.Elem())
+               key := TypeExpr(f, pkg, t.Key())
+               value := TypeExpr(f, pkg, t.Elem())
                if key == nil || value == nil {
                        return nil
                }
@@ -134,7 +131,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                if t.Dir() == types.SendRecv {
                        dir = ast.SEND | ast.RECV
                }
-               value := TypeExpr(fset, f, pkg, t.Elem())
+               value := TypeExpr(f, pkg, t.Elem())
                if value == nil {
                        return nil
                }
@@ -145,7 +142,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
        case *types.Signature:
                var params []*ast.Field
                for i := 0; i < t.Params().Len(); i++ {
-                       p := TypeExpr(fset, f, pkg, t.Params().At(i).Type())
+                       p := TypeExpr(f, pkg, t.Params().At(i).Type())
                        if p == nil {
                                return nil
                        }
@@ -160,7 +157,7 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                }
                var returns []*ast.Field
                for i := 0; i < t.Results().Len(); i++ {
-                       r := TypeExpr(fset, f, pkg, t.Results().At(i).Type())
+                       r := TypeExpr(f, pkg, t.Results().At(i).Type())
                        if r == nil {
                                return nil
                        }
@@ -184,13 +181,12 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty
                        return ast.NewIdent(t.Obj().Name())
                }
                pkgName := t.Obj().Pkg().Name()
+
                // If the file already imports the package under another name, use that.
-               for _, group := range astutil.Imports(fset, f) {
-                       for _, cand := range group {
-                               if strings.Trim(cand.Path.Value, `"`) == t.Obj().Pkg().Path() {
-                                       if cand.Name != nil && cand.Name.Name != "" {
-                                               pkgName = cand.Name.Name
-                                       }
+               for _, cand := range f.Imports {
+                       if path, _ := strconv.Unquote(cand.Path.Value); path == t.Obj().Pkg().Path() {
+                               if cand.Name != nil && cand.Name.Name != "" {
+                                       pkgName = cand.Name.Name
                                }
                        }
                }
@@ -399,30 +395,3 @@ func equivalentTypes(want, got types.Type) bool {
        }
        return types.AssignableTo(want, got)
 }
-
-// FindBestMatch employs fuzzy matching to evaluate the similarity of each given identifier to the
-// given pattern. We return the identifier whose name is most similar to the pattern.
-func FindBestMatch(pattern string, idents []*ast.Ident) ast.Expr {
-       fuzz := fuzzy.NewMatcher(pattern)
-       var bestFuzz ast.Expr
-       highScore := float32(0) // minimum score is 0 (no match)
-       for _, ident := range idents {
-               // TODO: Improve scoring algorithm.
-               score := fuzz.Score(ident.Name)
-               if score > highScore {
-                       highScore = score
-                       bestFuzz = ident
-               } else if score == 0 {
-                       // Order matters in the fuzzy matching algorithm. If we find no match
-                       // when matching the target to the identifier, try matching the identifier
-                       // to the target.
-                       revFuzz := fuzzy.NewMatcher(ident.Name)
-                       revScore := revFuzz.Score(pattern)
-                       if revScore > highScore {
-                               highScore = revScore
-                               bestFuzz = ident
-                       }
-               }
-       }
-       return bestFuzz
-}
diff --git a/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go b/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go
deleted file mode 100644 (file)
index c103816..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2019 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.
-
-package fuzzy
-
-import (
-       "unicode"
-)
-
-// RuneRole specifies the role of a rune in the context of an input.
-type RuneRole byte
-
-const (
-       // RNone specifies a rune without any role in the input (i.e., whitespace/non-ASCII).
-       RNone RuneRole = iota
-       // RSep specifies a rune with the role of segment separator.
-       RSep
-       // RTail specifies a rune which is a lower-case tail in a word in the input.
-       RTail
-       // RUCTail specifies a rune which is an upper-case tail in a word in the input.
-       RUCTail
-       // RHead specifies a rune which is the first character in a word in the input.
-       RHead
-)
-
-// RuneRoles detects the roles of each byte rune in an input string and stores it in the output
-// slice. The rune role depends on the input type. Stops when it parsed all the runes in the string
-// or when it filled the output. If output is nil, then it gets created.
-func RuneRoles(candidate []byte, reuse []RuneRole) []RuneRole {
-       var output []RuneRole
-       if cap(reuse) < len(candidate) {
-               output = make([]RuneRole, 0, len(candidate))
-       } else {
-               output = reuse[:0]
-       }
-
-       prev, prev2 := rtNone, rtNone
-       for i := 0; i < len(candidate); i++ {
-               r := rune(candidate[i])
-
-               role := RNone
-
-               curr := rtLower
-               if candidate[i] <= unicode.MaxASCII {
-                       curr = runeType(rt[candidate[i]] - '0')
-               }
-
-               if curr == rtLower {
-                       if prev == rtNone || prev == rtPunct {
-                               role = RHead
-                       } else {
-                               role = RTail
-                       }
-               } else if curr == rtUpper {
-                       role = RHead
-
-                       if prev == rtUpper {
-                               // This and previous characters are both upper case.
-
-                               if i+1 == len(candidate) {
-                                       // This is last character, previous was also uppercase -> this is UCTail
-                                       // i.e., (current char is C): aBC / BC / ABC
-                                       role = RUCTail
-                               }
-                       }
-               } else if curr == rtPunct {
-                       switch r {
-                       case '.', ':':
-                               role = RSep
-                       }
-               }
-               if curr != rtLower {
-                       if i > 1 && output[i-1] == RHead && prev2 == rtUpper && (output[i-2] == RHead || output[i-2] == RUCTail) {
-                               // The previous two characters were uppercase. The current one is not a lower case, so the
-                               // previous one can't be a HEAD. Make it a UCTail.
-                               // i.e., (last char is current char - B must be a UCTail): ABC / ZABC / AB.
-                               output[i-1] = RUCTail
-                       }
-               }
-
-               output = append(output, role)
-               prev2 = prev
-               prev = curr
-       }
-       return output
-}
-
-type runeType byte
-
-const (
-       rtNone runeType = iota
-       rtPunct
-       rtLower
-       rtUpper
-)
-
-const rt = "00000000000000000000000000000000000000000000001122222222221000000333333333333333333333333330000002222222222222222222222222200000"
-
-// LastSegment returns the substring representing the last segment from the input, where each
-// byte has an associated RuneRole in the roles slice. This makes sense only for inputs of Symbol
-// or Filename type.
-func LastSegment(input string, roles []RuneRole) string {
-       // Exclude ending separators.
-       end := len(input) - 1
-       for end >= 0 && roles[end] == RSep {
-               end--
-       }
-       if end < 0 {
-               return ""
-       }
-
-       start := end - 1
-       for start >= 0 && roles[start] != RSep {
-               start--
-       }
-
-       return input[start+1 : end+1]
-}
-
-// fromChunks copies string chunks into the given buffer.
-func fromChunks(chunks []string, buffer []byte) []byte {
-       ii := 0
-       for _, chunk := range chunks {
-               for i := 0; i < len(chunk); i++ {
-                       if ii >= cap(buffer) {
-                               break
-                       }
-                       buffer[ii] = chunk[i]
-                       ii++
-               }
-       }
-       return buffer[:ii]
-}
-
-// toLower transforms the input string to lower case, which is stored in the output byte slice.
-// The lower casing considers only ASCII values - non ASCII values are left unmodified.
-// Stops when parsed all input or when it filled the output slice. If output is nil, then it gets
-// created.
-func toLower(input []byte, reuse []byte) []byte {
-       output := reuse
-       if cap(reuse) < len(input) {
-               output = make([]byte, len(input))
-       }
-
-       for i := 0; i < len(input); i++ {
-               r := rune(input[i])
-               if input[i] <= unicode.MaxASCII {
-                       if 'A' <= r && r <= 'Z' {
-                               r += 'a' - 'A'
-                       }
-               }
-               output[i] = byte(r)
-       }
-       return output[:len(input)]
-}
-
-// WordConsumer defines a consumer for a word delimited by the [start,end) byte offsets in an input
-// (start is inclusive, end is exclusive).
-type WordConsumer func(start, end int)
-
-// Words find word delimiters in an input based on its bytes' mappings to rune roles. The offset
-// delimiters for each word are fed to the provided consumer function.
-func Words(roles []RuneRole, consume WordConsumer) {
-       var wordStart int
-       for i, r := range roles {
-               switch r {
-               case RUCTail, RTail:
-               case RHead, RNone, RSep:
-                       if i != wordStart {
-                               consume(wordStart, i)
-                       }
-                       wordStart = i
-                       if r != RHead {
-                               // Skip this character.
-                               wordStart = i + 1
-                       }
-               }
-       }
-       if wordStart != len(roles) {
-               consume(wordStart, len(roles))
-       }
-}
diff --git a/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go b/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go
deleted file mode 100644 (file)
index 265cdcf..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-// Copyright 2019 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.
-
-// Package fuzzy implements a fuzzy matching algorithm.
-package fuzzy
-
-import (
-       "bytes"
-       "fmt"
-)
-
-const (
-       // MaxInputSize is the maximum size of the input scored against the fuzzy matcher. Longer inputs
-       // will be truncated to this size.
-       MaxInputSize = 127
-       // MaxPatternSize is the maximum size of the pattern used to construct the fuzzy matcher. Longer
-       // inputs are truncated to this size.
-       MaxPatternSize = 63
-)
-
-type scoreVal int
-
-func (s scoreVal) val() int {
-       return int(s) >> 1
-}
-
-func (s scoreVal) prevK() int {
-       return int(s) & 1
-}
-
-func score(val int, prevK int /*0 or 1*/) scoreVal {
-       return scoreVal(val<<1 + prevK)
-}
-
-// Matcher implements a fuzzy matching algorithm for scoring candidates against a pattern.
-// The matcher does not support parallel usage.
-type Matcher struct {
-       pattern       string
-       patternLower  []byte // lower-case version of the pattern
-       patternShort  []byte // first characters of the pattern
-       caseSensitive bool   // set if the pattern is mix-cased
-
-       patternRoles []RuneRole // the role of each character in the pattern
-       roles        []RuneRole // the role of each character in the tested string
-
-       scores [MaxInputSize + 1][MaxPatternSize + 1][2]scoreVal
-
-       scoreScale float32
-
-       lastCandidateLen     int // in bytes
-       lastCandidateMatched bool
-
-       // Reusable buffers to avoid allocating for every candidate.
-       //  - inputBuf stores the concatenated input chunks
-       //  - lowerBuf stores the last candidate in lower-case
-       //  - rolesBuf stores the calculated roles for each rune in the last
-       //    candidate.
-       inputBuf [MaxInputSize]byte
-       lowerBuf [MaxInputSize]byte
-       rolesBuf [MaxInputSize]RuneRole
-}
-
-func (m *Matcher) bestK(i, j int) int {
-       if m.scores[i][j][0].val() < m.scores[i][j][1].val() {
-               return 1
-       }
-       return 0
-}
-
-// NewMatcher returns a new fuzzy matcher for scoring candidates against the provided pattern.
-func NewMatcher(pattern string) *Matcher {
-       if len(pattern) > MaxPatternSize {
-               pattern = pattern[:MaxPatternSize]
-       }
-
-       m := &Matcher{
-               pattern:      pattern,
-               patternLower: toLower([]byte(pattern), nil),
-       }
-
-       for i, c := range m.patternLower {
-               if pattern[i] != c {
-                       m.caseSensitive = true
-                       break
-               }
-       }
-
-       if len(pattern) > 3 {
-               m.patternShort = m.patternLower[:3]
-       } else {
-               m.patternShort = m.patternLower
-       }
-
-       m.patternRoles = RuneRoles([]byte(pattern), nil)
-
-       if len(pattern) > 0 {
-               maxCharScore := 4
-               m.scoreScale = 1 / float32(maxCharScore*len(pattern))
-       }
-
-       return m
-}
-
-// Score returns the score returned by matching the candidate to the pattern.
-// This is not designed for parallel use. Multiple candidates must be scored sequentially.
-// Returns a score between 0 and 1 (0 - no match, 1 - perfect match).
-func (m *Matcher) Score(candidate string) float32 {
-       return m.ScoreChunks([]string{candidate})
-}
-
-func (m *Matcher) ScoreChunks(chunks []string) float32 {
-       candidate := fromChunks(chunks, m.inputBuf[:])
-       if len(candidate) > MaxInputSize {
-               candidate = candidate[:MaxInputSize]
-       }
-       lower := toLower(candidate, m.lowerBuf[:])
-       m.lastCandidateLen = len(candidate)
-
-       if len(m.pattern) == 0 {
-               // Empty patterns perfectly match candidates.
-               return 1
-       }
-
-       if m.match(candidate, lower) {
-               sc := m.computeScore(candidate, lower)
-               if sc > minScore/2 && !m.poorMatch() {
-                       m.lastCandidateMatched = true
-                       if len(m.pattern) == len(candidate) {
-                               // Perfect match.
-                               return 1
-                       }
-
-                       if sc < 0 {
-                               sc = 0
-                       }
-                       normalizedScore := float32(sc) * m.scoreScale
-                       if normalizedScore > 1 {
-                               normalizedScore = 1
-                       }
-
-                       return normalizedScore
-               }
-       }
-
-       m.lastCandidateMatched = false
-       return 0
-}
-
-const minScore = -10000
-
-// MatchedRanges returns matches ranges for the last scored string as a flattened array of
-// [begin, end) byte offset pairs.
-func (m *Matcher) MatchedRanges() []int {
-       if len(m.pattern) == 0 || !m.lastCandidateMatched {
-               return nil
-       }
-       i, j := m.lastCandidateLen, len(m.pattern)
-       if m.scores[i][j][0].val() < minScore/2 && m.scores[i][j][1].val() < minScore/2 {
-               return nil
-       }
-
-       var ret []int
-       k := m.bestK(i, j)
-       for i > 0 {
-               take := (k == 1)
-               k = m.scores[i][j][k].prevK()
-               if take {
-                       if len(ret) == 0 || ret[len(ret)-1] != i {
-                               ret = append(ret, i)
-                               ret = append(ret, i-1)
-                       } else {
-                               ret[len(ret)-1] = i - 1
-                       }
-                       j--
-               }
-               i--
-       }
-       // Reverse slice.
-       for i := 0; i < len(ret)/2; i++ {
-               ret[i], ret[len(ret)-1-i] = ret[len(ret)-1-i], ret[i]
-       }
-       return ret
-}
-
-func (m *Matcher) match(candidate []byte, candidateLower []byte) bool {
-       i, j := 0, 0
-       for ; i < len(candidateLower) && j < len(m.patternLower); i++ {
-               if candidateLower[i] == m.patternLower[j] {
-                       j++
-               }
-       }
-       if j != len(m.patternLower) {
-               return false
-       }
-
-       // The input passes the simple test against pattern, so it is time to classify its characters.
-       // Character roles are used below to find the last segment.
-       m.roles = RuneRoles(candidate, m.rolesBuf[:])
-
-       return true
-}
-
-func (m *Matcher) computeScore(candidate []byte, candidateLower []byte) int {
-       pattLen, candLen := len(m.pattern), len(candidate)
-
-       for j := 0; j <= len(m.pattern); j++ {
-               m.scores[0][j][0] = minScore << 1
-               m.scores[0][j][1] = minScore << 1
-       }
-       m.scores[0][0][0] = score(0, 0) // Start with 0.
-
-       segmentsLeft, lastSegStart := 1, 0
-       for i := 0; i < candLen; i++ {
-               if m.roles[i] == RSep {
-                       segmentsLeft++
-                       lastSegStart = i + 1
-               }
-       }
-
-       // A per-character bonus for a consecutive match.
-       consecutiveBonus := 2
-       wordIdx := 0 // Word count within segment.
-       for i := 1; i <= candLen; i++ {
-
-               role := m.roles[i-1]
-               isHead := role == RHead
-
-               if isHead {
-                       wordIdx++
-               } else if role == RSep && segmentsLeft > 1 {
-                       wordIdx = 0
-                       segmentsLeft--
-               }
-
-               var skipPenalty int
-               if i == 1 || (i-1) == lastSegStart {
-                       // Skipping the start of first or last segment.
-                       skipPenalty++
-               }
-
-               for j := 0; j <= pattLen; j++ {
-                       // By default, we don't have a match. Fill in the skip data.
-                       m.scores[i][j][1] = minScore << 1
-
-                       // Compute the skip score.
-                       k := 0
-                       if m.scores[i-1][j][0].val() < m.scores[i-1][j][1].val() {
-                               k = 1
-                       }
-
-                       skipScore := m.scores[i-1][j][k].val()
-                       // Do not penalize missing characters after the last matched segment.
-                       if j != pattLen {
-                               skipScore -= skipPenalty
-                       }
-                       m.scores[i][j][0] = score(skipScore, k)
-
-                       if j == 0 || candidateLower[i-1] != m.patternLower[j-1] {
-                               // Not a match.
-                               continue
-                       }
-                       pRole := m.patternRoles[j-1]
-
-                       if role == RTail && pRole == RHead {
-                               if j > 1 {
-                                       // Not a match: a head in the pattern matches a tail character in the candidate.
-                                       continue
-                               }
-                               // Special treatment for the first character of the pattern. We allow
-                               // matches in the middle of a word if they are long enough, at least
-                               // min(3, pattern.length) characters.
-                               if !bytes.HasPrefix(candidateLower[i-1:], m.patternShort) {
-                                       continue
-                               }
-                       }
-
-                       // Compute the char score.
-                       var charScore int
-                       // Bonus 1: the char is in the candidate's last segment.
-                       if segmentsLeft <= 1 {
-                               charScore++
-                       }
-                       // Bonus 2: Case match or a Head in the pattern aligns with one in the word.
-                       // Single-case patterns lack segmentation signals and we assume any character
-                       // can be a head of a segment.
-                       if candidate[i-1] == m.pattern[j-1] || role == RHead && (!m.caseSensitive || pRole == RHead) {
-                               charScore++
-                       }
-
-                       // Penalty 1: pattern char is Head, candidate char is Tail.
-                       if role == RTail && pRole == RHead {
-                               charScore--
-                       }
-                       // Penalty 2: first pattern character matched in the middle of a word.
-                       if j == 1 && role == RTail {
-                               charScore -= 4
-                       }
-
-                       // Third dimension encodes whether there is a gap between the previous match and the current
-                       // one.
-                       for k := 0; k < 2; k++ {
-                               sc := m.scores[i-1][j-1][k].val() + charScore
-
-                               isConsecutive := k == 1 || i-1 == 0 || i-1 == lastSegStart
-                               if isConsecutive {
-                                       // Bonus 3: a consecutive match. First character match also gets a bonus to
-                                       // ensure prefix final match score normalizes to 1.0.
-                                       // Logically, this is a part of charScore, but we have to compute it here because it
-                                       // only applies for consecutive matches (k == 1).
-                                       sc += consecutiveBonus
-                               }
-                               if k == 0 {
-                                       // Penalty 3: Matching inside a segment (and previous char wasn't matched). Penalize for the lack
-                                       // of alignment.
-                                       if role == RTail || role == RUCTail {
-                                               sc -= 3
-                                       }
-                               }
-
-                               if sc > m.scores[i][j][1].val() {
-                                       m.scores[i][j][1] = score(sc, k)
-                               }
-                       }
-               }
-       }
-
-       result := m.scores[len(candidate)][len(m.pattern)][m.bestK(len(candidate), len(m.pattern))].val()
-
-       return result
-}
-
-// ScoreTable returns the score table computed for the provided candidate. Used only for debugging.
-func (m *Matcher) ScoreTable(candidate string) string {
-       var buf bytes.Buffer
-
-       var line1, line2, separator bytes.Buffer
-       line1.WriteString("\t")
-       line2.WriteString("\t")
-       for j := 0; j < len(m.pattern); j++ {
-               line1.WriteString(fmt.Sprintf("%c\t\t", m.pattern[j]))
-               separator.WriteString("----------------")
-       }
-
-       buf.WriteString(line1.String())
-       buf.WriteString("\n")
-       buf.WriteString(separator.String())
-       buf.WriteString("\n")
-
-       for i := 1; i <= len(candidate); i++ {
-               line1.Reset()
-               line2.Reset()
-
-               line1.WriteString(fmt.Sprintf("%c\t", candidate[i-1]))
-               line2.WriteString("\t")
-
-               for j := 1; j <= len(m.pattern); j++ {
-                       line1.WriteString(fmt.Sprintf("M%6d(%c)\t", m.scores[i][j][0].val(), dir(m.scores[i][j][0].prevK())))
-                       line2.WriteString(fmt.Sprintf("H%6d(%c)\t", m.scores[i][j][1].val(), dir(m.scores[i][j][1].prevK())))
-               }
-               buf.WriteString(line1.String())
-               buf.WriteString("\n")
-               buf.WriteString(line2.String())
-               buf.WriteString("\n")
-               buf.WriteString(separator.String())
-               buf.WriteString("\n")
-       }
-
-       return buf.String()
-}
-
-func dir(prevK int) rune {
-       if prevK == 0 {
-               return 'M'
-       }
-       return 'H'
-}
-
-func (m *Matcher) poorMatch() bool {
-       if len(m.pattern) < 2 {
-               return false
-       }
-
-       i, j := m.lastCandidateLen, len(m.pattern)
-       k := m.bestK(i, j)
-
-       var counter, len int
-       for i > 0 {
-               take := (k == 1)
-               k = m.scores[i][j][k].prevK()
-               if take {
-                       len++
-                       if k == 0 && len < 3 && m.roles[i-1] == RTail {
-                               // Short match in the middle of a word
-                               counter++
-                               if counter > 1 {
-                                       return true
-                               }
-                       }
-                       j--
-               } else {
-                       len = 0
-               }
-               i--
-       }
-       return false
-}
diff --git a/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/symbol.go b/src/cmd/vendor/golang.org/x/tools/internal/lsp/fuzzy/symbol.go
deleted file mode 100644 (file)
index 073a4cd..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2021 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.
-
-package fuzzy
-
-import (
-       "unicode"
-)
-
-// SymbolMatcher implements a fuzzy matching algorithm optimized for Go symbols
-// of the form:
-//
-//     example.com/path/to/package.object.field
-//
-// Knowing that we are matching symbols like this allows us to make the
-// following optimizations:
-//   - We can incorporate right-to-left relevance directly into the score
-//     calculation.
-//   - We can match from right to left, discarding leading bytes if the input is
-//     too long.
-//   - We just take the right-most match without losing too much precision. This
-//     allows us to use an O(n) algorithm.
-//   - We can operate directly on chunked strings; in many cases we will
-//     be storing the package path and/or package name separately from the
-//     symbol or identifiers, so doing this avoids allocating strings.
-//   - We can return the index of the right-most match, allowing us to trim
-//     irrelevant qualification.
-//
-// This implementation is experimental, serving as a reference fast algorithm
-// to compare to the fuzzy algorithm implemented by Matcher.
-type SymbolMatcher struct {
-       // Using buffers of length 256 is both a reasonable size for most qualified
-       // symbols, and makes it easy to avoid bounds checks by using uint8 indexes.
-       pattern     [256]rune
-       patternLen  uint8
-       inputBuffer [256]rune   // avoid allocating when considering chunks
-       roles       [256]uint32 // which roles does a rune play (word start, etc.)
-       segments    [256]uint8  // how many segments from the right is each rune
-}
-
-const (
-       segmentStart uint32 = 1 << iota
-       wordStart
-       separator
-)
-
-// NewSymbolMatcher creates a SymbolMatcher that may be used to match the given
-// search pattern.
-//
-// Currently this matcher only accepts case-insensitive fuzzy patterns.
-//
-// An empty pattern matches no input.
-func NewSymbolMatcher(pattern string) *SymbolMatcher {
-       m := &SymbolMatcher{}
-       for _, p := range pattern {
-               m.pattern[m.patternLen] = unicode.ToLower(p)
-               m.patternLen++
-               if m.patternLen == 255 || int(m.patternLen) == len(pattern) {
-                       // break at 255 so that we can represent patternLen with a uint8.
-                       break
-               }
-       }
-       return m
-}
-
-// Match looks for the right-most match of the search pattern within the symbol
-// represented by concatenating the given chunks, returning its offset and
-// score.
-//
-// If a match is found, the first return value will hold the absolute byte
-// offset within all chunks for the start of the symbol. In other words, the
-// index of the match within strings.Join(chunks, ""). If no match is found,
-// the first return value will be -1.
-//
-// The second return value will be the score of the match, which is always
-// between 0 and 1, inclusive. A score of 0 indicates no match.
-func (m *SymbolMatcher) Match(chunks []string) (int, float64) {
-       // Explicit behavior for an empty pattern.
-       //
-       // As a minor optimization, this also avoids nilness checks later on, since
-       // the compiler can prove that m != nil.
-       if m.patternLen == 0 {
-               return -1, 0
-       }
-
-       // First phase: populate the input buffer with lower-cased runes.
-       //
-       // We could also check for a forward match here, but since we'd have to write
-       // the entire input anyway this has negligible impact on performance.
-
-       var (
-               inputLen  = uint8(0)
-               modifiers = wordStart | segmentStart
-       )
-
-input:
-       for _, chunk := range chunks {
-               for _, r := range chunk {
-                       if r == '.' || r == '/' {
-                               modifiers |= separator
-                       }
-                       // optimization: avoid calls to unicode.ToLower, which can't be inlined.
-                       l := r
-                       if r <= unicode.MaxASCII {
-                               if 'A' <= r && r <= 'Z' {
-                                       l = r + 'a' - 'A'
-                               }
-                       } else {
-                               l = unicode.ToLower(r)
-                       }
-                       if l != r {
-                               modifiers |= wordStart
-                       }
-                       m.inputBuffer[inputLen] = l
-                       m.roles[inputLen] = modifiers
-                       inputLen++
-                       if m.roles[inputLen-1]&separator != 0 {
-                               modifiers = wordStart | segmentStart
-                       } else {
-                               modifiers = 0
-                       }
-                       // TODO: we should prefer the right-most input if it overflows, rather
-                       //       than the left-most as we're doing here.
-                       if inputLen == 255 {
-                               break input
-                       }
-               }
-       }
-
-       // Second phase: find the right-most match, and count segments from the
-       // right.
-
-       var (
-               pi    = uint8(m.patternLen - 1) // pattern index
-               p     = m.pattern[pi]           // pattern rune
-               start = -1                      // start offset of match
-               rseg  = uint8(0)
-       )
-       const maxSeg = 3 // maximum number of segments from the right to count, for scoring purposes.
-
-       for ii := inputLen - 1; ; ii-- {
-               r := m.inputBuffer[ii]
-               if rseg < maxSeg && m.roles[ii]&separator != 0 {
-                       rseg++
-               }
-               m.segments[ii] = rseg
-               if p == r {
-                       if pi == 0 {
-                               start = int(ii)
-                               break
-                       }
-                       pi--
-                       p = m.pattern[pi]
-               }
-               // Don't check ii >= 0 in the loop condition: ii is a uint8.
-               if ii == 0 {
-                       break
-               }
-       }
-
-       if start < 0 {
-               // no match: skip scoring
-               return -1, 0
-       }
-
-       // Third phase: find the shortest match, and compute the score.
-
-       // Score is the average score for each character.
-       //
-       // A character score is the multiple of:
-       //   1. 1.0 if the character starts a segment, .8 if the character start a
-       //      mid-segment word, otherwise 0.6. This carries over to immediately
-       //      following characters.
-       //   2. For the final character match, the multiplier from (1) is reduced to
-       //     .8 if the next character in the input is a mid-segment word, or 0.6 if
-       //      the next character in the input is not a word or segment start. This
-       //      ensures that we favor whole-word or whole-segment matches over prefix
-       //      matches.
-       //   3. 1.0 if the character is part of the last segment, otherwise
-       //      1.0-.2*<segments from the right>, with a max segment count of 3.
-       //
-       // This is a very naive algorithm, but it is fast. There's lots of prior art
-       // here, and we should leverage it. For example, we could explicitly consider
-       // character distance, and exact matches of words or segments.
-       //
-       // Also note that this might not actually find the highest scoring match, as
-       // doing so could require a non-linear algorithm, depending on how the score
-       // is calculated.
-
-       pi = 0
-       p = m.pattern[pi]
-
-       const (
-               segStreak  = 1.0
-               wordStreak = 0.8
-               noStreak   = 0.6
-               perSegment = 0.2 // we count at most 3 segments above
-       )
-
-       streakBonus := noStreak
-       totScore := 0.0
-       for ii := uint8(start); ii < inputLen; ii++ {
-               r := m.inputBuffer[ii]
-               if r == p {
-                       pi++
-                       p = m.pattern[pi]
-                       // Note: this could be optimized with some bit operations.
-                       switch {
-                       case m.roles[ii]&segmentStart != 0 && segStreak > streakBonus:
-                               streakBonus = segStreak
-                       case m.roles[ii]&wordStart != 0 && wordStreak > streakBonus:
-                               streakBonus = wordStreak
-                       }
-                       finalChar := pi >= m.patternLen
-                       // finalCost := 1.0
-                       if finalChar && streakBonus > noStreak {
-                               switch {
-                               case ii == inputLen-1 || m.roles[ii+1]&segmentStart != 0:
-                                       // Full segment: no reduction
-                               case m.roles[ii+1]&wordStart != 0:
-                                       streakBonus = wordStreak
-                               default:
-                                       streakBonus = noStreak
-                               }
-                       }
-                       totScore += streakBonus * (1.0 - float64(m.segments[ii])*perSegment)
-                       if finalChar {
-                               break
-                       }
-               } else {
-                       streakBonus = noStreak
-               }
-       }
-
-       return start, totScore / float64(m.patternLen)
-}
diff --git a/src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go
new file mode 100644 (file)
index 0000000..993135e
--- /dev/null
@@ -0,0 +1,122 @@
+// Copyright 2022 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.
+
+package typeparams
+
+import (
+       "go/types"
+)
+
+// CoreType returns the core type of T or nil if T does not have a core type.
+//
+// See https://go.dev/ref/spec#Core_types for the definition of a core type.
+func CoreType(T types.Type) types.Type {
+       U := T.Underlying()
+       if _, ok := U.(*types.Interface); !ok {
+               return U // for non-interface types,
+       }
+
+       terms, err := _NormalTerms(U)
+       if len(terms) == 0 || err != nil {
+               // len(terms) -> empty type set of interface.
+               // err != nil => U is invalid, exceeds complexity bounds, or has an empty type set.
+               return nil // no core type.
+       }
+
+       U = terms[0].Type().Underlying()
+       var identical int // i in [0,identical) => Identical(U, terms[i].Type().Underlying())
+       for identical = 1; identical < len(terms); identical++ {
+               if !types.Identical(U, terms[identical].Type().Underlying()) {
+                       break
+               }
+       }
+
+       if identical == len(terms) {
+               // https://go.dev/ref/spec#Core_types
+               // "There is a single type U which is the underlying type of all types in the type set of T"
+               return U
+       }
+       ch, ok := U.(*types.Chan)
+       if !ok {
+               return nil // no core type as identical < len(terms) and U is not a channel.
+       }
+       // https://go.dev/ref/spec#Core_types
+       // "the type chan E if T contains only bidirectional channels, or the type chan<- E or
+       // <-chan E depending on the direction of the directional channels present."
+       for chans := identical; chans < len(terms); chans++ {
+               curr, ok := terms[chans].Type().Underlying().(*types.Chan)
+               if !ok {
+                       return nil
+               }
+               if !types.Identical(ch.Elem(), curr.Elem()) {
+                       return nil // channel elements are not identical.
+               }
+               if ch.Dir() == types.SendRecv {
+                       // ch is bidirectional. We can safely always use curr's direction.
+                       ch = curr
+               } else if curr.Dir() != types.SendRecv && ch.Dir() != curr.Dir() {
+                       // ch and curr are not bidirectional and not the same direction.
+                       return nil
+               }
+       }
+       return ch
+}
+
+// _NormalTerms returns a slice of terms representing the normalized structural
+// type restrictions of a type, if any.
+//
+// For all types other than *types.TypeParam, *types.Interface, and
+// *types.Union, this is just a single term with Tilde() == false and
+// Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see
+// below.
+//
+// Structural type restrictions of a type parameter are created via
+// non-interface types embedded in its constraint interface (directly, or via a
+// chain of interface embeddings). For example, in the declaration type
+// T[P interface{~int; m()}] int the structural restriction of the type
+// parameter P is ~int.
+//
+// With interface embedding and unions, the specification of structural type
+// restrictions may be arbitrarily complex. For example, consider the
+// following:
+//
+//  type A interface{ ~string|~[]byte }
+//
+//  type B interface{ int|string }
+//
+//  type C interface { ~string|~int }
+//
+//  type T[P interface{ A|B; C }] int
+//
+// In this example, the structural type restriction of P is ~string|int: A|B
+// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
+// which when intersected with C (~string|~int) yields ~string|int.
+//
+// _NormalTerms computes these expansions and reductions, producing a
+// "normalized" form of the embeddings. A structural restriction is normalized
+// if it is a single union containing no interface terms, and is minimal in the
+// sense that removing any term changes the set of types satisfying the
+// constraint. It is left as a proof for the reader that, modulo sorting, there
+// is exactly one such normalized form.
+//
+// Because the minimal representation always takes this form, _NormalTerms
+// returns a slice of tilde terms corresponding to the terms of the union in
+// the normalized structural restriction. An error is returned if the type is
+// invalid, exceeds complexity bounds, or has an empty type set. In the latter
+// case, _NormalTerms returns ErrEmptyTypeSet.
+//
+// _NormalTerms makes no guarantees about the order of terms, except that it
+// is deterministic.
+func _NormalTerms(typ types.Type) ([]*Term, error) {
+       switch typ := typ.(type) {
+       case *TypeParam:
+               return StructuralTerms(typ)
+       case *Union:
+               return UnionTermSet(typ)
+       case *types.Interface:
+               return InterfaceTermSet(typ)
+       default:
+               return []*Term{NewTerm(false, typ)}, nil
+       }
+}
index 4e4b5b63433a7fe89ece8a9cccecb25df9a4892d..888ddbc4c120b0df1b574f54255c8a38394847c1 100644 (file)
@@ -17,13 +17,13 @@ github.com/google/pprof/third_party/svgpan
 # github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2
 ## explicit; go 1.12
 github.com/ianlancetaylor/demangle
-# golang.org/x/arch v0.0.0-20220412001346-fc48f9fe4c15
+# golang.org/x/arch v0.0.0-20220722155209-00200b7164a7
 ## explicit; go 1.17
 golang.org/x/arch/arm/armasm
 golang.org/x/arch/arm64/arm64asm
 golang.org/x/arch/ppc64/ppc64asm
 golang.org/x/arch/x86/x86asm
-# golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8
+# golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
 ## explicit; go 1.17
 golang.org/x/crypto/ed25519
 # golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
@@ -37,20 +37,20 @@ golang.org/x/mod/sumdb/dirhash
 golang.org/x/mod/sumdb/note
 golang.org/x/mod/sumdb/tlog
 golang.org/x/mod/zip
-# golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
+# golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
 ## explicit
 golang.org/x/sync/semaphore
-# golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098
+# golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704
 ## explicit; go 1.17
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/plan9
 golang.org/x/sys/unix
 golang.org/x/sys/windows
-# golang.org/x/term v0.0.0-20220411215600-e5f449aeb171
+# golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
 ## explicit; go 1.17
 golang.org/x/term
-# golang.org/x/tools v0.1.11-0.20220516163903-1e55371df567
-## explicit; go 1.17
+# golang.org/x/tools v0.1.12-0.20220725193627-2a6393fe54b3
+## explicit; go 1.18
 golang.org/x/tools/cover
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/internal/analysisflags
@@ -92,5 +92,4 @@ golang.org/x/tools/go/cfg
 golang.org/x/tools/go/types/objectpath
 golang.org/x/tools/go/types/typeutil
 golang.org/x/tools/internal/analysisinternal
-golang.org/x/tools/internal/lsp/fuzzy
 golang.org/x/tools/internal/typeparams
index 94380d656788f9dea3feae723b48e823c2ba9618..8537e5737ff104589137c5f001a917a2a4505488 100644 (file)
@@ -1,13 +1,13 @@
 module std
 
-go 1.19
+go 1.20
 
 require (
-       golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8
+       golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
        golang.org/x/net v0.0.0-20220517181318-183a9ca12b87
 )
 
 require (
-       golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 // indirect
-       golang.org/x/text v0.3.8-0.20220509174342-b4bca84b0361 // indirect
+       golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 // indirect
+       golang.org/x/text v0.3.8-0.20220722155301-d03b41800055 // indirect
 )
index a54b0565bdc97c07703b3a7b543c0e7d8c4c6d52..46b9425c1b81f5eb48bd6e0ba2ea93993b0fd78f 100644 (file)
@@ -1,8 +1,8 @@
-golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8 h1:y+mHpWoQJNAHt26Nhh6JP7hvM71IRZureyvZhoVALIs=
-golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
 golang.org/x/net v0.0.0-20220517181318-183a9ca12b87 h1:cCR+9mKLOGyX4Zx+uBZDXEDAQsvKQ/XbW4vreG5v1jU=
 golang.org/x/net v0.0.0-20220517181318-183a9ca12b87/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 h1:PgOr27OhUx2IRqGJ2RxAWI4dJQ7bi9cSrB82uzFzfUA=
-golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/text v0.3.8-0.20220509174342-b4bca84b0361 h1:h+pU/hCb7sEApigI6eII3/Emx5ZHaFWS+nulUp0Az/k=
-golang.org/x/text v0.3.8-0.20220509174342-b4bca84b0361/go.mod h1:5O0TPrbzDRCcAYs9rc2W4CFPmVHJfNFe8tESfECPJPE=
+golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 h1:Y7NOhdqIOU8kYI7BxsgL38d0ot0raxvcW+EMQU2QrT4=
+golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.3.8-0.20220722155301-d03b41800055 h1:mr0sHTB/O2dJ0ivoAAz1Mqs776JzxylyunOKJws3B88=
+golang.org/x/text v0.3.8-0.20220722155301-d03b41800055/go.mod h1:5O0TPrbzDRCcAYs9rc2W4CFPmVHJfNFe8tESfECPJPE=
index 84cc9de8e786e067315861c0cdeda50b764dfc0a..e5f343a185705ea6fc9e50f7c05facd9611991f7 100644 (file)
@@ -11,6 +11,7 @@ import (
        "bytes"
        "fmt"
        "go/token"
+       "internal/dag"
        "internal/testenv"
        "io/fs"
        "os"
@@ -29,40 +30,9 @@ import (
 // without prior discussion.
 // Negative assertions should almost never be removed.
 //
-// The general syntax of a rule is:
+// "a < b" means package b can import package a.
 //
-//     a, b < c, d;
-//
-// which means c and d come after a and b in the partial order
-// (that is, c and d can import a and b),
-// but doesn't provide a relative order between a vs b or c vs d.
-//
-// The rules can chain together, as in:
-//
-//     e < f, g < h;
-//
-// which is equivalent to
-//
-//     e < f, g;
-//     f, g < h;
-//
-// Except for the special bottom element "NONE", each name
-// must appear exactly once on the right-hand side of a rule.
-// That rule serves as the definition of the allowed dependencies
-// for that name. The definition must appear before any uses
-// of the name on the left-hand side of a rule. (That is, the
-// rules themselves must be ordered according to the partial
-// order, for easier reading by people.)
-//
-// Negative assertions double-check the partial order:
-//
-//     i !< j
-//
-// means that it must NOT be the case that i < j.
-// Negative assertions may appear anywhere in the rules,
-// even before i and j have been defined.
-//
-// Comments begin with #.
+// See `go doc internal/dag' for the full syntax.
 //
 // All-caps names are pseudo-names for specific points
 // in the dependency lattice.
@@ -177,7 +147,11 @@ var depsRules = `
 
        os/signal, STR
        < path/filepath
-       < io/ioutil, os/exec;
+       < io/ioutil;
+
+       os < internal/godebug;
+
+       path/filepath, internal/godebug < os/exec;
 
        io/ioutil, os/exec, os/signal
        < OS;
@@ -187,8 +161,6 @@ var depsRules = `
        OS
        < golang.org/x/sys/cpu;
 
-       os < internal/godebug;
-
        # FMT is OS (which includes string routines) plus reflect and fmt.
        # It does not include package log, which should be avoided in core packages.
        strconv, unicode
@@ -206,6 +178,7 @@ var depsRules = `
        # Misc packages needing only FMT.
        FMT
        < html,
+         internal/dag,
          internal/goroot,
          mime/quotedprintable,
          net/internal/socktest,
@@ -624,11 +597,10 @@ func TestDependencies(t *testing.T) {
                if sawImport[pkg] == nil {
                        sawImport[pkg] = map[string]bool{}
                }
-               ok := policy[pkg]
                var bad []string
                for _, imp := range imports {
                        sawImport[pkg][imp] = true
-                       if !ok[imp] {
+                       if !policy.HasEdge(pkg, imp) {
                                bad = append(bad, imp)
                        }
                }
@@ -697,187 +669,12 @@ func findImports(pkg string) ([]string, error) {
 }
 
 // depsPolicy returns a map m such that m[p][d] == true when p can import d.
-func depsPolicy(t *testing.T) map[string]map[string]bool {
-       allowed := map[string]map[string]bool{"NONE": {}}
-       disallowed := [][2][]string{}
-
-       parseDepsRules(t, func(deps []string, op string, users []string) {
-               if op == "!<" {
-                       disallowed = append(disallowed, [2][]string{deps, users})
-                       return
-               }
-               for _, u := range users {
-                       if allowed[u] != nil {
-                               t.Errorf("multiple deps lists for %s", u)
-                       }
-                       allowed[u] = make(map[string]bool)
-                       for _, d := range deps {
-                               if allowed[d] == nil {
-                                       t.Errorf("use of %s before its deps list", d)
-                               }
-                               allowed[u][d] = true
-                       }
-               }
-       })
-
-       // Check for missing deps info.
-       for _, deps := range allowed {
-               for d := range deps {
-                       if allowed[d] == nil {
-                               t.Errorf("missing deps list for %s", d)
-                       }
-               }
-       }
-
-       // Complete transitive allowed deps.
-       for k := range allowed {
-               for i := range allowed {
-                       for j := range allowed {
-                               if i != k && k != j && allowed[i][k] && allowed[k][j] {
-                                       if i == j {
-                                               // Can only happen along with a "use of X before deps" error above,
-                                               // but this error is more specific - it makes clear that reordering the
-                                               // rules will not be enough to fix the problem.
-                                               t.Errorf("deps policy cycle: %s < %s < %s", j, k, i)
-                                       }
-                                       allowed[i][j] = true
-                               }
-                       }
-               }
-       }
-
-       // Check negative assertions against completed allowed deps.
-       for _, bad := range disallowed {
-               deps, users := bad[0], bad[1]
-               for _, d := range deps {
-                       for _, u := range users {
-                               if allowed[u][d] {
-                                       t.Errorf("deps policy incorrect: assertion failed: %s !< %s", d, u)
-                               }
-                       }
-               }
-       }
-
-       if t.Failed() {
-               t.FailNow()
-       }
-
-       return allowed
-}
-
-// parseDepsRules parses depsRules, calling save(deps, op, users)
-// for each deps < users or deps !< users rule
-// (op is "<" or "!<").
-func parseDepsRules(t *testing.T, save func(deps []string, op string, users []string)) {
-       p := &depsParser{t: t, lineno: 1, text: depsRules}
-
-       var prev []string
-       var op string
-       for {
-               list, tok := p.nextList()
-               if tok == "" {
-                       if prev == nil {
-                               break
-                       }
-                       p.syntaxError("unexpected EOF")
-               }
-               if prev != nil {
-                       save(prev, op, list)
-               }
-               prev = list
-               if tok == ";" {
-                       prev = nil
-                       op = ""
-                       continue
-               }
-               if tok != "<" && tok != "!<" {
-                       p.syntaxError("missing <")
-               }
-               op = tok
-       }
-}
-
-// A depsParser parses the depsRules syntax described above.
-type depsParser struct {
-       t        *testing.T
-       lineno   int
-       lastWord string
-       text     string
-}
-
-// syntaxError reports a parsing error.
-func (p *depsParser) syntaxError(msg string) {
-       p.t.Fatalf("deps:%d: syntax error: %s near %s", p.lineno, msg, p.lastWord)
-}
-
-// nextList parses and returns a comma-separated list of names.
-func (p *depsParser) nextList() (list []string, token string) {
-       for {
-               tok := p.nextToken()
-               switch tok {
-               case "":
-                       if len(list) == 0 {
-                               return nil, ""
-                       }
-                       fallthrough
-               case ",", "<", "!<", ";":
-                       p.syntaxError("bad list syntax")
-               }
-               list = append(list, tok)
-
-               tok = p.nextToken()
-               if tok != "," {
-                       return list, tok
-               }
-       }
-}
-
-// nextToken returns the next token in the deps rules,
-// one of ";" "," "<" "!<" or a name.
-func (p *depsParser) nextToken() string {
-       for {
-               if p.text == "" {
-                       return ""
-               }
-               switch p.text[0] {
-               case ';', ',', '<':
-                       t := p.text[:1]
-                       p.text = p.text[1:]
-                       return t
-
-               case '!':
-                       if len(p.text) < 2 || p.text[1] != '<' {
-                               p.syntaxError("unexpected token !")
-                       }
-                       p.text = p.text[2:]
-                       return "!<"
-
-               case '#':
-                       i := strings.Index(p.text, "\n")
-                       if i < 0 {
-                               i = len(p.text)
-                       }
-                       p.text = p.text[i:]
-                       continue
-
-               case '\n':
-                       p.lineno++
-                       fallthrough
-               case ' ', '\t':
-                       p.text = p.text[1:]
-                       continue
-
-               default:
-                       i := strings.IndexAny(p.text, "!;,<#\n \t")
-                       if i < 0 {
-                               i = len(p.text)
-                       }
-                       t := p.text[:i]
-                       p.text = p.text[i:]
-                       p.lastWord = t
-                       return t
-               }
+func depsPolicy(t *testing.T) *dag.Graph {
+       g, err := dag.Parse(depsRules)
+       if err != nil {
+               t.Fatal(err)
        }
+       return g
 }
 
 // TestStdlibLowercase tests that all standard library package names are
diff --git a/src/internal/dag/alg.go b/src/internal/dag/alg.go
new file mode 100644 (file)
index 0000000..8800279
--- /dev/null
@@ -0,0 +1,63 @@
+// Copyright 2022 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.
+
+package dag
+
+// Transpose reverses all edges in g.
+func (g *Graph) Transpose() {
+       old := g.edges
+
+       g.edges = make(map[string]map[string]bool)
+       for _, n := range g.Nodes {
+               g.edges[n] = make(map[string]bool)
+       }
+
+       for from, tos := range old {
+               for to := range tos {
+                       g.edges[to][from] = true
+               }
+       }
+}
+
+// Topo returns a topological sort of g. This function is deterministic.
+func (g *Graph) Topo() []string {
+       topo := make([]string, 0, len(g.Nodes))
+       marks := make(map[string]bool)
+
+       var visit func(n string)
+       visit = func(n string) {
+               if marks[n] {
+                       return
+               }
+               for _, to := range g.Edges(n) {
+                       visit(to)
+               }
+               marks[n] = true
+               topo = append(topo, n)
+       }
+       for _, root := range g.Nodes {
+               visit(root)
+       }
+       for i, j := 0, len(topo)-1; i < j; i, j = i+1, j-1 {
+               topo[i], topo[j] = topo[j], topo[i]
+       }
+       return topo
+}
+
+// TransitiveReduction removes edges from g that are transitively
+// reachable. g must be transitively closed.
+func (g *Graph) TransitiveReduction() {
+       // For i -> j -> k, if i -> k exists, delete it.
+       for _, i := range g.Nodes {
+               for _, j := range g.Nodes {
+                       if g.HasEdge(i, j) {
+                               for _, k := range g.Nodes {
+                                       if g.HasEdge(j, k) {
+                                               g.DelEdge(i, k)
+                                       }
+                               }
+                       }
+               }
+       }
+}
diff --git a/src/internal/dag/alg_test.go b/src/internal/dag/alg_test.go
new file mode 100644 (file)
index 0000000..e5ea8b6
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright 2022 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.
+
+package dag
+
+import (
+       "reflect"
+       "strings"
+       "testing"
+)
+
+func TestTranspose(t *testing.T) {
+       g := mustParse(t, diamond)
+       g.Transpose()
+       wantEdges(t, g, "a->b a->c a->d b->d c->d")
+}
+
+func TestTopo(t *testing.T) {
+       g := mustParse(t, diamond)
+       got := g.Topo()
+       // "d" is the root, so it's first.
+       //
+       // "c" and "b" could be in either order, but Topo is
+       // deterministic in reverse node definition order.
+       //
+       // "a" is a leaf.
+       wantNodes := strings.Fields("d c b a")
+       if !reflect.DeepEqual(wantNodes, got) {
+               t.Fatalf("want topo sort %v, got %v", wantNodes, got)
+       }
+}
+
+func TestTransitiveReduction(t *testing.T) {
+       t.Run("diamond", func(t *testing.T) {
+               g := mustParse(t, diamond)
+               g.TransitiveReduction()
+               wantEdges(t, g, "b->a c->a d->b d->c")
+       })
+       t.Run("chain", func(t *testing.T) {
+               const chain = `NONE < a < b < c < d; a, d < e;`
+               g := mustParse(t, chain)
+               g.TransitiveReduction()
+               wantEdges(t, g, "e->d d->c c->b b->a")
+       })
+}
diff --git a/src/internal/dag/parse.go b/src/internal/dag/parse.go
new file mode 100644 (file)
index 0000000..9d5b918
--- /dev/null
@@ -0,0 +1,314 @@
+// Copyright 2022 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.
+
+// Package dag implements a language for expressing directed acyclic
+// graphs.
+//
+// The general syntax of a rule is:
+//
+//     a, b < c, d;
+//
+// which means c and d come after a and b in the partial order
+// (that is, there are edges from c and d to a and b),
+// but doesn't provide a relative order between a vs b or c vs d.
+//
+// The rules can chain together, as in:
+//
+//     e < f, g < h;
+//
+// which is equivalent to
+//
+//     e < f, g;
+//     f, g < h;
+//
+// Except for the special bottom element "NONE", each name
+// must appear exactly once on the right-hand side of any rule.
+// That rule serves as the definition of the allowed successor
+// for that name. The definition must appear before any uses
+// of the name on the left-hand side of a rule. (That is, the
+// rules themselves must be ordered according to the partial
+// order, for easier reading by people.)
+//
+// Negative assertions double-check the partial order:
+//
+//     i !< j
+//
+// means that it must NOT be the case that i < j.
+// Negative assertions may appear anywhere in the rules,
+// even before i and j have been defined.
+//
+// Comments begin with #.
+package dag
+
+import (
+       "fmt"
+       "sort"
+       "strings"
+)
+
+type Graph struct {
+       Nodes   []string
+       byLabel map[string]int
+       edges   map[string]map[string]bool
+}
+
+func newGraph() *Graph {
+       return &Graph{byLabel: map[string]int{}, edges: map[string]map[string]bool{}}
+}
+
+func (g *Graph) addNode(label string) bool {
+       if _, ok := g.byLabel[label]; ok {
+               return false
+       }
+       g.byLabel[label] = len(g.Nodes)
+       g.Nodes = append(g.Nodes, label)
+       g.edges[label] = map[string]bool{}
+       return true
+}
+
+func (g *Graph) AddEdge(from, to string) {
+       g.edges[from][to] = true
+}
+
+func (g *Graph) DelEdge(from, to string) {
+       delete(g.edges[from], to)
+}
+
+func (g *Graph) HasEdge(from, to string) bool {
+       return g.edges[from] != nil && g.edges[from][to]
+}
+
+func (g *Graph) Edges(from string) []string {
+       edges := make([]string, 0, 16)
+       for k := range g.edges[from] {
+               edges = append(edges, k)
+       }
+       sort.Slice(edges, func(i, j int) bool { return g.byLabel[edges[i]] < g.byLabel[edges[j]] })
+       return edges
+}
+
+// Parse parses the DAG language and returns the transitive closure of
+// the described graph. In the returned graph, there is an edge from "b"
+// to "a" if b < a (or a > b) in the partial order.
+func Parse(dag string) (*Graph, error) {
+       g := newGraph()
+       disallowed := []rule{}
+
+       rules, err := parseRules(dag)
+       if err != nil {
+               return nil, err
+       }
+
+       // TODO: Add line numbers to errors.
+       var errors []string
+       errorf := func(format string, a ...any) {
+               errors = append(errors, fmt.Sprintf(format, a...))
+       }
+       for _, r := range rules {
+               if r.op == "!<" {
+                       disallowed = append(disallowed, r)
+                       continue
+               }
+               for _, def := range r.def {
+                       if def == "NONE" {
+                               errorf("NONE cannot be a predecessor")
+                               continue
+                       }
+                       if !g.addNode(def) {
+                               errorf("multiple definitions for %s", def)
+                       }
+                       for _, less := range r.less {
+                               if less == "NONE" {
+                                       continue
+                               }
+                               if _, ok := g.byLabel[less]; !ok {
+                                       errorf("use of %s before its definition", less)
+                               } else {
+                                       g.AddEdge(def, less)
+                               }
+                       }
+               }
+       }
+
+       // Check for missing definition.
+       for _, tos := range g.edges {
+               for to := range tos {
+                       if g.edges[to] == nil {
+                               errorf("missing definition for %s", to)
+                       }
+               }
+       }
+
+       // Complete transitive closure.
+       for _, k := range g.Nodes {
+               for _, i := range g.Nodes {
+                       for _, j := range g.Nodes {
+                               if i != k && k != j && g.HasEdge(i, k) && g.HasEdge(k, j) {
+                                       if i == j {
+                                               // Can only happen along with a "use of X before deps" error above,
+                                               // but this error is more specific - it makes clear that reordering the
+                                               // rules will not be enough to fix the problem.
+                                               errorf("graph cycle: %s < %s < %s", j, k, i)
+                                       }
+                                       g.AddEdge(i, j)
+                               }
+                       }
+               }
+       }
+
+       // Check negative assertions against completed allowed graph.
+       for _, bad := range disallowed {
+               for _, less := range bad.less {
+                       for _, def := range bad.def {
+                               if g.HasEdge(def, less) {
+                                       errorf("graph edge assertion failed: %s !< %s", less, def)
+                               }
+                       }
+               }
+       }
+
+       if len(errors) > 0 {
+               return nil, fmt.Errorf("%s", strings.Join(errors, "\n"))
+       }
+
+       return g, nil
+}
+
+// A rule is a line in the DAG language where "less < def" or "less !< def".
+type rule struct {
+       less []string
+       op   string // Either "<" or "!<"
+       def  []string
+}
+
+type syntaxError string
+
+func (e syntaxError) Error() string {
+       return string(e)
+}
+
+// parseRules parses the rules of a DAG.
+func parseRules(rules string) (out []rule, err error) {
+       defer func() {
+               e := recover()
+               switch e := e.(type) {
+               case nil:
+                       return
+               case syntaxError:
+                       err = e
+               default:
+                       panic(e)
+               }
+       }()
+       p := &rulesParser{lineno: 1, text: rules}
+
+       var prev []string
+       var op string
+       for {
+               list, tok := p.nextList()
+               if tok == "" {
+                       if prev == nil {
+                               break
+                       }
+                       p.syntaxError("unexpected EOF")
+               }
+               if prev != nil {
+                       out = append(out, rule{prev, op, list})
+               }
+               prev = list
+               if tok == ";" {
+                       prev = nil
+                       op = ""
+                       continue
+               }
+               if tok != "<" && tok != "!<" {
+                       p.syntaxError("missing <")
+               }
+               op = tok
+       }
+
+       return out, err
+}
+
+// A rulesParser parses the depsRules syntax described above.
+type rulesParser struct {
+       lineno   int
+       lastWord string
+       text     string
+}
+
+// syntaxError reports a parsing error.
+func (p *rulesParser) syntaxError(msg string) {
+       panic(syntaxError(fmt.Sprintf("parsing graph: line %d: syntax error: %s near %s", p.lineno, msg, p.lastWord)))
+}
+
+// nextList parses and returns a comma-separated list of names.
+func (p *rulesParser) nextList() (list []string, token string) {
+       for {
+               tok := p.nextToken()
+               switch tok {
+               case "":
+                       if len(list) == 0 {
+                               return nil, ""
+                       }
+                       fallthrough
+               case ",", "<", "!<", ";":
+                       p.syntaxError("bad list syntax")
+               }
+               list = append(list, tok)
+
+               tok = p.nextToken()
+               if tok != "," {
+                       return list, tok
+               }
+       }
+}
+
+// nextToken returns the next token in the deps rules,
+// one of ";" "," "<" "!<" or a name.
+func (p *rulesParser) nextToken() string {
+       for {
+               if p.text == "" {
+                       return ""
+               }
+               switch p.text[0] {
+               case ';', ',', '<':
+                       t := p.text[:1]
+                       p.text = p.text[1:]
+                       return t
+
+               case '!':
+                       if len(p.text) < 2 || p.text[1] != '<' {
+                               p.syntaxError("unexpected token !")
+                       }
+                       p.text = p.text[2:]
+                       return "!<"
+
+               case '#':
+                       i := strings.Index(p.text, "\n")
+                       if i < 0 {
+                               i = len(p.text)
+                       }
+                       p.text = p.text[i:]
+                       continue
+
+               case '\n':
+                       p.lineno++
+                       fallthrough
+               case ' ', '\t':
+                       p.text = p.text[1:]
+                       continue
+
+               default:
+                       i := strings.IndexAny(p.text, "!;,<#\n \t")
+                       if i < 0 {
+                               i = len(p.text)
+                       }
+                       t := p.text[:i]
+                       p.text = p.text[i:]
+                       p.lastWord = t
+                       return t
+               }
+       }
+}
diff --git a/src/internal/dag/parse_test.go b/src/internal/dag/parse_test.go
new file mode 100644 (file)
index 0000000..b2520c3
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright 2022 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.
+
+package dag
+
+import (
+       "reflect"
+       "strings"
+       "testing"
+)
+
+const diamond = `
+NONE < a < b, c < d;
+`
+
+func mustParse(t *testing.T, dag string) *Graph {
+       t.Helper()
+       g, err := Parse(dag)
+       if err != nil {
+               t.Fatal(err)
+       }
+       return g
+}
+
+func wantEdges(t *testing.T, g *Graph, edges string) {
+       t.Helper()
+
+       wantEdges := strings.Fields(edges)
+       wantEdgeMap := make(map[string]bool)
+       for _, e := range wantEdges {
+               wantEdgeMap[e] = true
+       }
+
+       for _, n1 := range g.Nodes {
+               for _, n2 := range g.Nodes {
+                       got := g.HasEdge(n1, n2)
+                       want := wantEdgeMap[n1+"->"+n2]
+                       if got && want {
+                               t.Logf("%s->%s", n1, n2)
+                       } else if got && !want {
+                               t.Errorf("%s->%s present but not expected", n1, n2)
+                       } else if want && !got {
+                               t.Errorf("%s->%s missing but expected", n1, n2)
+                       }
+               }
+       }
+}
+
+func TestParse(t *testing.T) {
+       // Basic smoke test for graph parsing.
+       g := mustParse(t, diamond)
+
+       wantNodes := strings.Fields("a b c d")
+       if !reflect.DeepEqual(wantNodes, g.Nodes) {
+               t.Fatalf("want nodes %v, got %v", wantNodes, g.Nodes)
+       }
+
+       // Parse returns the transitive closure, so it adds d->a.
+       wantEdges(t, g, "b->a c->a d->a d->b d->c")
+}
index da33e68cafd75f2d38183e30a82fcba0f73c354b..e9ecf8e64319f3faff1cb030106651c097e2a80f 100644 (file)
@@ -9,4 +9,4 @@ package goversion
 //
 // It should be updated at the start of each development cycle to be
 // the version of the next Go 1.x release. See golang.org/issue/40705.
-const Version = 19
+const Version = 20
diff --git a/src/internal/pkgbits/frames_go1.go b/src/internal/pkgbits/frames_go1.go
deleted file mode 100644 (file)
index 5294f6a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2021 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.
-
-//go:build !go1.7
-// +build !go1.7
-
-// TODO(mdempsky): Remove after #44505 is resolved
-
-package pkgbits
-
-import "runtime"
-
-func walkFrames(pcs []uintptr, visit frameVisitor) {
-       for _, pc := range pcs {
-               fn := runtime.FuncForPC(pc)
-               file, line := fn.FileLine(pc)
-
-               visit(file, line, fn.Name(), pc-fn.Entry())
-       }
-}
diff --git a/src/internal/pkgbits/frames_go17.go b/src/internal/pkgbits/frames_go17.go
deleted file mode 100644 (file)
index 2324ae7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2021 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.
-
-//go:build go1.7
-// +build go1.7
-
-package pkgbits
-
-import "runtime"
-
-// walkFrames calls visit for each call frame represented by pcs.
-//
-// pcs should be a slice of PCs, as returned by runtime.Callers.
-func walkFrames(pcs []uintptr, visit frameVisitor) {
-       if len(pcs) == 0 {
-               return
-       }
-
-       frames := runtime.CallersFrames(pcs)
-       for {
-               frame, more := frames.Next()
-               visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry)
-               if !more {
-                       return
-               }
-       }
-}
index a17a0088f759aee53b762707df9f99037e49a0ff..1520b73afb9e960c166c587981bc934017ecbb74 100644 (file)
@@ -6,6 +6,7 @@ package pkgbits
 
 import (
        "fmt"
+       "runtime"
        "strings"
 )
 
@@ -23,6 +24,24 @@ func fmtFrames(pcs ...uintptr) []string {
 
 type frameVisitor func(file string, line int, name string, offset uintptr)
 
+// walkFrames calls visit for each call frame represented by pcs.
+//
+// pcs should be a slice of PCs, as returned by runtime.Callers.
+func walkFrames(pcs []uintptr, visit frameVisitor) {
+       if len(pcs) == 0 {
+               return
+       }
+
+       frames := runtime.CallersFrames(pcs)
+       for {
+               frame, more := frames.Next()
+               visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry)
+               if !more {
+                       return
+               }
+       }
+}
+
 // SyncMarker is an enum type that represents markers that may be
 // written to export data to ensure the reader and writer stay
 // synchronized.
index 8f434708196761b0acc1c7b0014066c03b6cfb7e..29a9cce888986f99fe529f4eb3f742320aa34365 100644 (file)
@@ -89,14 +89,16 @@ if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
 set GOROOT=%GOROOT_TEMP%\r
 set GOROOT_TEMP=\r
 \r
-echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%\r
-if x%vflag==x-v echo cmd/dist\r
 setlocal\r
-set GOROOT=%GOROOT_BOOTSTRAP%\r
 set GOOS=\r
 set GOARCH=\r
-set GOBIN=\r
 set GOEXPERIMENT=\r
+for /f "tokens=*" %%g IN ('%GOROOT_BOOTSTRAP%\bin\go version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)\r
+set GOROOT_BOOTSTRAP_VERSION=%GOROOT_BOOTSTRAP_VERSION:go version =%\r
+echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%. (%GOROOT_BOOTSTRAP_VERSION%)\r
+if x%vflag==x-v echo cmd/dist\r
+set GOROOT=%GOROOT_BOOTSTRAP%\r
+set GOBIN=\r
 set GO111MODULE=off\r
 set GOENV=off\r
 set GOFLAGS=\r
index 4597403a041366e1bfd4c7e3defce3605c5120ba..d9c7f2d8170a9ac666fe7db69501025c2e09bfd8 100755 (executable)
@@ -81,7 +81,11 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
        exit bootstrap
 }
 
-echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
+# Get the exact bootstrap toolchain version to help with debugging.
+# We clear GOOS and GOARCH to avoid an ominous but harmless warning if
+# the bootstrap doesn't support them.
+GOROOT_BOOTSTRAP_VERSION=`{GOOS='' GOARCH='' GOEXPERIMENT='' $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //'}
+echo 'Building Go cmd/dist using '$GOROOT_BOOTSTRAP'. ('$"GOROOT_BOOTSTRAP_VERSION')'
 if(~ $#vflag 1)
        echo cmd/dist
 GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off GOENV=off GOFLAGS='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
index 4fa74752b946dbf0d8bf2ceeb400444d2572673e..4ceacde10e43f8e5ce3cd7b2c56ea189b825602b 100644 (file)
@@ -633,7 +633,9 @@ func TestIPv6WriteMsgUDPAddrPortTargetAddrIPVersion(t *testing.T) {
        }
 
        switch runtime.GOOS {
-       case "openbsd":
+       case "dragonfly", "openbsd":
+               // DragonflyBSD's IPv6 sockets are always IPv6-only, according to the man page:
+               // https://www.dragonflybsd.org/cgi/web-man?command=ip6 (search for IPV6_V6ONLY).
                // OpenBSD's IPv6 sockets are always IPv6-only, according to the man page:
                // https://man.openbsd.org/ip6#IPV6_V6ONLY
                t.Skipf("skipping on %v", runtime.GOOS)
index e2d2dba7a5bb3ada55da8b105b799a32f18acbd3..306f98cbaaa4754e9c34acd7aad5d8b69e1a226d 100644 (file)
@@ -56,40 +56,58 @@ func TestLookPath(t *testing.T) {
 
        // Add "." to PATH so that exec.LookPath looks in the current directory on all systems.
        // And try to trick it with "../testdir" too.
-       for _, dir := range []string{".", "../testdir"} {
-               t.Run(pathVar+"="+dir, func(t *testing.T) {
-                       t.Setenv(pathVar, dir+string(filepath.ListSeparator)+origPath)
-                       good := dir + "/execabs-test"
-                       if found, err := LookPath(good); err != nil || !strings.HasPrefix(found, good) {
-                               t.Fatalf(`LookPath(%#q) = %#q, %v, want "%s...", nil`, good, found, err, good)
-                       }
-                       if runtime.GOOS == "windows" {
-                               good = dir + `\execabs-test`
-                               if found, err := LookPath(good); err != nil || !strings.HasPrefix(found, good) {
-                                       t.Fatalf(`LookPath(%#q) = %#q, %v, want "%s...", nil`, good, found, err, good)
-                               }
-                       }
-
-                       if _, err := LookPath("execabs-test"); err == nil {
-                               t.Fatalf("LookPath didn't fail when finding a non-relative path")
-                       } else if !errors.Is(err, ErrDot) {
-                               t.Fatalf("LookPath returned unexpected error: want Is ErrDot, got %q", err)
-                       }
-
-                       cmd := Command("execabs-test")
-                       if cmd.Err == nil {
-                               t.Fatalf("Command didn't fail when finding a non-relative path")
-                       } else if !errors.Is(cmd.Err, ErrDot) {
-                               t.Fatalf("Command returned unexpected error: want Is ErrDot, got %q", cmd.Err)
-                       }
-                       cmd.Err = nil
-
-                       // Clearing cmd.Err should let the execution proceed,
-                       // and it should fail because it's not a valid binary.
-                       if err := cmd.Run(); err == nil {
-                               t.Fatalf("Run did not fail: expected exec error")
-                       } else if errors.Is(err, ErrDot) {
-                               t.Fatalf("Run returned unexpected error ErrDot: want error like ENOEXEC: %q", err)
+       for _, errdot := range []string{"1", "0"} {
+               t.Run("GODEBUG=execerrdot="+errdot, func(t *testing.T) {
+                       t.Setenv("GODEBUG", "execerrdot="+errdot)
+                       for _, dir := range []string{".", "../testdir"} {
+                               t.Run(pathVar+"="+dir, func(t *testing.T) {
+                                       t.Setenv(pathVar, dir+string(filepath.ListSeparator)+origPath)
+                                       good := dir + "/execabs-test"
+                                       if found, err := LookPath(good); err != nil || !strings.HasPrefix(found, good) {
+                                               t.Fatalf(`LookPath(%#q) = %#q, %v, want "%s...", nil`, good, found, err, good)
+                                       }
+                                       if runtime.GOOS == "windows" {
+                                               good = dir + `\execabs-test`
+                                               if found, err := LookPath(good); err != nil || !strings.HasPrefix(found, good) {
+                                                       t.Fatalf(`LookPath(%#q) = %#q, %v, want "%s...", nil`, good, found, err, good)
+                                               }
+                                       }
+
+                                       _, err := LookPath("execabs-test")
+                                       if errdot == "1" {
+                                               if err == nil {
+                                                       t.Fatalf("LookPath didn't fail when finding a non-relative path")
+                                               } else if !errors.Is(err, ErrDot) {
+                                                       t.Fatalf("LookPath returned unexpected error: want Is ErrDot, got %q", err)
+                                               }
+                                       } else {
+                                               if err != nil {
+                                                       t.Fatalf("LookPath failed unexpectedly: %v", err)
+                                               }
+                                       }
+
+                                       cmd := Command("execabs-test")
+                                       if errdot == "1" {
+                                               if cmd.Err == nil {
+                                                       t.Fatalf("Command didn't fail when finding a non-relative path")
+                                               } else if !errors.Is(cmd.Err, ErrDot) {
+                                                       t.Fatalf("Command returned unexpected error: want Is ErrDot, got %q", cmd.Err)
+                                               }
+                                               cmd.Err = nil
+                                       } else {
+                                               if cmd.Err != nil {
+                                                       t.Fatalf("Command failed unexpectedly: %v", err)
+                                               }
+                                       }
+
+                                       // Clearing cmd.Err should let the execution proceed,
+                                       // and it should fail because it's not a valid binary.
+                                       if err := cmd.Run(); err == nil {
+                                               t.Fatalf("Run did not fail: expected exec error")
+                                       } else if errors.Is(err, ErrDot) {
+                                               t.Fatalf("Run returned unexpected error ErrDot: want error like ENOEXEC: %q", err)
+                                       }
+                               })
                        }
                })
        }
index 57d18420bbdcc905de69a8d9ae494a7ee54d3c7c..737aaab6a7dc3a3a5f829ee120a8fbd97c7c3eb8 100644 (file)
 //             log.Fatal(err)
 //     }
 //
+// Setting the environment variable GODEBUG=execerrdot=0
+// disables generation of ErrDot entirely, temporarily restoring the pre-Go 1.19
+// behavior for programs that are unable to apply more targeted fixes.
+// A future version of Go may remove support for this variable.
+//
 // Before adding such overrides, make sure you understand the
 // security implications of doing so.
 // See https://go.dev/blog/path-security for more information.
index 68224814d12c47c05f10f6ab855251cfe25fa69c..092684f03a236b6a8f89f97ff042205ad6dc724c 100644 (file)
@@ -6,6 +6,7 @@ package exec
 
 import (
        "errors"
+       "internal/godebug"
        "io/fs"
        "os"
        "path/filepath"
@@ -53,7 +54,7 @@ func LookPath(file string) (string, error) {
        for _, dir := range filepath.SplitList(path) {
                path := filepath.Join(dir, file)
                if err := findExecutable(path); err == nil {
-                       if !filepath.IsAbs(path) {
+                       if !filepath.IsAbs(path) && godebug.Get("execerrdot") != "0" {
                                return path, &Error{file, ErrDot}
                        }
                        return path, nil
index 983320566366c237bd0b84696684be30b23447a1..b2b412c96b6f9cbefd578975dfc465343003302a 100644 (file)
@@ -8,6 +8,7 @@ package exec
 
 import (
        "errors"
+       "internal/godebug"
        "io/fs"
        "os"
        "path/filepath"
@@ -56,7 +57,7 @@ func LookPath(file string) (string, error) {
                }
                path := filepath.Join(dir, file)
                if err := findExecutable(path); err == nil {
-                       if !filepath.IsAbs(path) {
+                       if !filepath.IsAbs(path) && godebug.Get("execerrdot") != "0" {
                                return path, &Error{file, ErrDot}
                        }
                        return path, nil
index da047585ebda5e5ecc0c31fc95b1e87c19e1be42..ec45db7459bc56fcc4cd23b9a04c4b5989197c1f 100644 (file)
@@ -6,6 +6,7 @@ package exec
 
 import (
        "errors"
+       "internal/godebug"
        "io/fs"
        "os"
        "path/filepath"
@@ -102,6 +103,9 @@ func LookPath(file string) (string, error) {
        )
        if _, found := syscall.Getenv("NoDefaultCurrentDirectoryInExePath"); !found {
                if f, err := findExecutable(filepath.Join(".", file), exts); err == nil {
+                       if godebug.Get("execerrdot") == "0" {
+                               return f, nil
+                       }
                        dotf, dotErr = f, &Error{file, ErrDot}
                }
        }
@@ -124,7 +128,7 @@ func LookPath(file string) (string, error) {
                                }
                        }
 
-                       if !filepath.IsAbs(f) {
+                       if !filepath.IsAbs(f) && godebug.Get("execerrdot") != "0" {
                                return f, &Error{file, ErrDot}
                        }
                        return f, nil
index 74a2ec09bcd6802a78d0cfc04df6d3837a93f37c..6b492093eacc09ac948329db84b64dbf992a55f2 100644 (file)
@@ -32,14 +32,14 @@ func cgoCheckWriteBarrier(dst *uintptr, src uintptr) {
 
        // If we are running on the system stack then dst might be an
        // address on the stack, which is OK.
-       g := getg()
-       if g == g.m.g0 || g == g.m.gsignal {
+       gp := getg()
+       if gp == gp.m.g0 || gp == gp.m.gsignal {
                return
        }
 
        // Allocating memory can write to various mfixalloc structs
        // that look like they are non-Go memory.
-       if g.m.mallocing != 0 {
+       if gp.m.mallocing != 0 {
                return
        }
 
index 993af7063b98d75dc917e7d6475ad63620462b7e..ca516ad9e8b8489086a879d8285c3d5c2d30860f 100644 (file)
@@ -780,7 +780,7 @@ func (q *waitq) dequeue() *sudog {
                } else {
                        y.prev = nil
                        q.first = y
-                       sgp.next = nil // mark as removed (see dequeueSudog)
+                       sgp.next = nil // mark as removed (see dequeueSudoG)
                }
 
                // if a goroutine was put on this queue because of a
index 0ab23e0eb79ccc835ec9bc9b9b932efc1a241102..669c36f0d584bd7e2d464a893c6afc92f45c4cfa 100644 (file)
@@ -85,13 +85,13 @@ func debug_modinfo() string {
 //go:linkname mayMoreStackPreempt
 func mayMoreStackPreempt() {
        // Don't do anything on the g0 or gsignal stack.
-       g := getg()
-       if g == g.m.g0 || g == g.m.gsignal {
+       gp := getg()
+       if gp == gp.m.g0 || gp == gp.m.gsignal {
                return
        }
        // Force a preemption, unless the stack is already poisoned.
-       if g.stackguard0 < stackPoisonMin {
-               g.stackguard0 = stackPreempt
+       if gp.stackguard0 < stackPoisonMin {
+               gp.stackguard0 = stackPreempt
        }
 }
 
@@ -104,12 +104,12 @@ func mayMoreStackPreempt() {
 //go:linkname mayMoreStackMove
 func mayMoreStackMove() {
        // Don't do anything on the g0 or gsignal stack.
-       g := getg()
-       if g == g.m.g0 || g == g.m.gsignal {
+       gp := getg()
+       if gp == gp.m.g0 || gp == gp.m.gsignal {
                return
        }
        // Force stack movement, unless the stack is already poisoned.
-       if g.stackguard0 < stackPoisonMin {
-               g.stackguard0 = stackForceMove
+       if gp.stackguard0 < stackPoisonMin {
+               gp.stackguard0 = stackForceMove
        }
 }
index 1a9074e64641344a97adb7db0627a623129af45e..c9dfdcb3936dcfa417c62f313a471fad6018aa29 100644 (file)
@@ -25,11 +25,11 @@ 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 {
-       g := getg()
-       g.writebuf = make([]byte, 0, 1<<20)
+       gp := getg()
+       gp.writebuf = make([]byte, 0, 1<<20)
        printDebugLog()
-       buf := g.writebuf
-       g.writebuf = nil
+       buf := gp.writebuf
+       gp.writebuf = nil
 
        return string(buf)
 }
index 9639946fa9c5010ec32d8b96a53adb4eac5f4261..ab0537d8b20f2b3b0bdc2dbefb5db579e65d342f 100644 (file)
@@ -84,23 +84,23 @@ func GCMask(x any) (ret []byte) {
 }
 
 func RunSchedLocalQueueTest() {
-       _p_ := new(p)
-       gs := make([]g, len(_p_.runq))
+       pp := new(p)
+       gs := make([]g, len(pp.runq))
        Escape(gs) // Ensure gs doesn't move, since we use guintptrs
-       for i := 0; i < len(_p_.runq); i++ {
-               if g, _ := runqget(_p_); g != nil {
+       for i := 0; i < len(pp.runq); i++ {
+               if g, _ := runqget(pp); g != nil {
                        throw("runq is not empty initially")
                }
                for j := 0; j < i; j++ {
-                       runqput(_p_, &gs[i], false)
+                       runqput(pp, &gs[i], false)
                }
                for j := 0; j < i; j++ {
-                       if g, _ := runqget(_p_); g != &gs[i] {
+                       if g, _ := runqget(pp); g != &gs[i] {
                                print("bad element at iter ", i, "/", j, "\n")
                                throw("bad element")
                        }
                }
-               if g, _ := runqget(_p_); g != nil {
+               if g, _ := runqget(pp); g != nil {
                        throw("runq is not empty afterwards")
                }
        }
@@ -460,17 +460,17 @@ func MapBucketsPointerIsNil(m map[int]int) bool {
 }
 
 func LockOSCounts() (external, internal uint32) {
-       g := getg()
-       if g.m.lockedExt+g.m.lockedInt == 0 {
-               if g.lockedm != 0 {
+       gp := getg()
+       if gp.m.lockedExt+gp.m.lockedInt == 0 {
+               if gp.lockedm != 0 {
                        panic("lockedm on non-locked goroutine")
                }
        } else {
-               if g.lockedm == 0 {
+               if gp.lockedm == 0 {
                        panic("nil lockedm on locked goroutine")
                }
        }
-       return g.m.lockedExt, g.m.lockedInt
+       return gp.m.lockedExt, gp.m.lockedInt
 }
 
 //go:noinline
index c7f2b7a4431a27509dcfbfd9519148f8d0d88adf..543efeded4f52ddbb40bc03c3e7f5307918610e5 100644 (file)
@@ -693,9 +693,9 @@ func mdump(m *MemStats) {
 func writeheapdump_m(fd uintptr, m *MemStats) {
        assertWorldStopped()
 
-       _g_ := getg()
-       casgstatus(_g_.m.curg, _Grunning, _Gwaiting)
-       _g_.waitreason = waitReasonDumpingHeap
+       gp := getg()
+       casgstatus(gp.m.curg, _Grunning, _Gwaiting)
+       gp.waitreason = waitReasonDumpingHeap
 
        // Set dump file.
        dumpfd = fd
@@ -710,7 +710,7 @@ func writeheapdump_m(fd uintptr, m *MemStats) {
                tmpbuf = nil
        }
 
-       casgstatus(_g_.m.curg, _Gwaiting, _Grunning)
+       casgstatus(gp.m.curg, _Gwaiting, _Grunning)
 }
 
 // dumpint() the kind & offset of each field in an object.
index 154130cf63b87619dbd97e3525cdcdbb9fe6f305..88cbd3bcc7e4ac187e920ec70dab9fa959fa26be 100644 (file)
@@ -36,12 +36,21 @@ const (
        // We use one bit to distinguish between the two ranges.
        aixAddrBits = 57
        aixCntBits  = 64 - aixAddrBits + 3
+
+       // riscv64 SV57 mode gives 56 bits of userspace VA.
+       // lfstack code supports it, but broader support for SV57 mode is incomplete,
+       // and there may be other issues (see #54104).
+       riscv64AddrBits = 56
+       riscv64CntBits  = 64 - riscv64AddrBits + 3
 )
 
 func lfstackPack(node *lfnode, cnt uintptr) uint64 {
        if GOARCH == "ppc64" && GOOS == "aix" {
                return uint64(uintptr(unsafe.Pointer(node)))<<(64-aixAddrBits) | uint64(cnt&(1<<aixCntBits-1))
        }
+       if GOARCH == "riscv64" {
+               return uint64(uintptr(unsafe.Pointer(node)))<<(64-riscv64AddrBits) | uint64(cnt&(1<<riscv64CntBits-1))
+       }
        return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
 }
 
@@ -54,5 +63,8 @@ func lfstackUnpack(val uint64) *lfnode {
        if GOARCH == "ppc64" && GOOS == "aix" {
                return (*lfnode)(unsafe.Pointer(uintptr((val >> aixCntBits << 3) | 0xa<<56)))
        }
+       if GOARCH == "riscv64" {
+               return (*lfnode)(unsafe.Pointer(uintptr(val >> riscv64CntBits << 3)))
+       }
        return (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
 }
index bb0b189fc73dc4ae596436edee1844b920b55c32..50d35dbc57fb1fb173464b996b06c1bae7d5cefb 100644 (file)
-// Copyright 2020 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.
-
-// This file records the static ranks of the locks in the runtime. If a lock
-// is not given a rank, then it is assumed to be a leaf lock, which means no other
-// lock can be acquired while it is held. Therefore, leaf locks do not need to be
-// given an explicit rank. We list all of the architecture-independent leaf locks
-// for documentation purposes, but don't list any of the architecture-dependent
-// locks (which are all leaf locks). debugLock is ignored for ranking, since it is used
-// when printing out lock ranking errors.
-//
-// lockInit(l *mutex, rank int) is used to set the rank of lock before it is used.
-// If there is no clear place to initialize a lock, then the rank of a lock can be
-// specified during the lock call itself via lockWithrank(l *mutex, rank int).
-//
-// Besides the static lock ranking (which is a total ordering of the locks), we
-// also represent and enforce the actual partial order among the locks in the
-// arcs[] array below. That is, if it is possible that lock B can be acquired when
-// lock A is the previous acquired lock that is still held, then there should be
-// an entry for A in arcs[B][]. We will currently fail not only if the total order
-// (the lock ranking) is violated, but also if there is a missing entry in the
-// partial order.
+// Code generated by mklockrank.go; DO NOT EDIT.
 
 package runtime
 
 type lockRank int
 
-// Constants representing the lock rank of the architecture-independent locks in
-// the runtime. Locks with lower rank must be taken before locks with higher
-// rank.
+// Constants representing the ranks of all non-leaf runtime locks, in rank order.
+// Locks with lower rank must be taken before locks with higher rank,
+// in addition to satisfying the partial order in lockPartialOrder.
+// A few ranks allow self-cycles, which are specified in lockPartialOrder.
 const (
-       lockRankDummy lockRank = iota
+       lockRankUnknown lockRank = iota
 
-       // Locks held above sched
        lockRankSysmon
        lockRankScavenge
        lockRankForcegc
+       lockRankDefer
        lockRankSweepWaiters
        lockRankAssistQueue
-       lockRankCpuprof
        lockRankSweep
-
        lockRankPollDesc
+       lockRankCpuprof
        lockRankSched
-       lockRankDeadlock
        lockRankAllg
        lockRankAllp
-
-       lockRankTimers // Multiple timers locked simultaneously in destroy()
+       lockRankTimers
+       lockRankNetpollInit
+       lockRankHchan
+       lockRankNotifyList
+       lockRankSudog
+       lockRankRwmutexW
+       lockRankRwmutexR
+       lockRankRoot
        lockRankItab
        lockRankReflectOffs
-       lockRankHchan // Multiple hchans acquired in lock order in syncadjustsudogs()
+       // TRACEGLOBAL
        lockRankTraceBuf
-       lockRankFin
-       lockRankNotifyList
        lockRankTraceStrings
+       // MALLOC
+       lockRankFin
+       lockRankGcBitsArenas
+       lockRankMheapSpecial
        lockRankMspanSpecial
+       lockRankSpanSetSpine
+       // MPROF
        lockRankProfInsert
        lockRankProfBlock
        lockRankProfMemActive
        lockRankProfMemFuture
-       lockRankGcBitsArenas
-       lockRankRoot
+       // TRACE
        lockRankTrace
        lockRankTraceStackTab
-       lockRankNetpollInit
-
-       lockRankRwmutexW
-       lockRankRwmutexR
-
-       lockRankSpanSetSpine
+       // STACKGROW
        lockRankGscan
        lockRankStackpool
        lockRankStackLarge
-       lockRankDefer
-       lockRankSudog
-
-       // Memory-related non-leaf locks
+       lockRankHchanLeaf
+       // WB
        lockRankWbufSpans
        lockRankMheap
-       lockRankMheapSpecial
-
-       // Memory-related leaf locks
        lockRankGlobalAlloc
-       lockRankPageAllocScav
-
-       // Other leaf locks
-       lockRankGFree
-       // Generally, hchan must be acquired before gscan. But in one specific
-       // case (in syncadjustsudogs from markroot after the g has been suspended
-       // by suspendG), we allow gscan to be acquired, and then an hchan lock. To
-       // allow this case, we get this lockRankHchanLeaf rank in
-       // syncadjustsudogs(), rather than lockRankHchan. By using this special
-       // rank, we don't allow any further locks to be acquired other than more
-       // hchan locks.
-       lockRankHchanLeaf
        lockRankPanic
-
-       // Leaf locks with no dependencies, so these constants are not actually used anywhere.
-       // There are other architecture-dependent leaf locks as well.
-       lockRankNewmHandoff
-       lockRankDebugPtrmask
-       lockRankFaketimeState
-       lockRankTicks
-       lockRankRaceFini
-       lockRankPollCache
-       lockRankDebug
+       lockRankDeadlock
 )
 
-// lockRankLeafRank is the rank of lock that does not have a declared rank, and hence is
-// a leaf lock.
+// lockRankLeafRank is the rank of lock that does not have a declared rank,
+// and hence is a leaf lock.
 const lockRankLeafRank lockRank = 1000
 
-// lockNames gives the names associated with each of the above ranks
+// lockNames gives the names associated with each of the above ranks.
 var lockNames = []string{
-       lockRankDummy: "",
-
-       lockRankSysmon:       "sysmon",
-       lockRankScavenge:     "scavenge",
-       lockRankForcegc:      "forcegc",
-       lockRankSweepWaiters: "sweepWaiters",
-       lockRankAssistQueue:  "assistQueue",
-       lockRankCpuprof:      "cpuprof",
-       lockRankSweep:        "sweep",
-
-       lockRankPollDesc: "pollDesc",
-       lockRankSched:    "sched",
-       lockRankDeadlock: "deadlock",
-       lockRankAllg:     "allg",
-       lockRankAllp:     "allp",
-
-       lockRankTimers:      "timers",
-       lockRankItab:        "itab",
-       lockRankReflectOffs: "reflectOffs",
-
+       lockRankSysmon:        "sysmon",
+       lockRankScavenge:      "scavenge",
+       lockRankForcegc:       "forcegc",
+       lockRankDefer:         "defer",
+       lockRankSweepWaiters:  "sweepWaiters",
+       lockRankAssistQueue:   "assistQueue",
+       lockRankSweep:         "sweep",
+       lockRankPollDesc:      "pollDesc",
+       lockRankCpuprof:       "cpuprof",
+       lockRankSched:         "sched",
+       lockRankAllg:          "allg",
+       lockRankAllp:          "allp",
+       lockRankTimers:        "timers",
+       lockRankNetpollInit:   "netpollInit",
        lockRankHchan:         "hchan",
-       lockRankTraceBuf:      "traceBuf",
-       lockRankFin:           "fin",
        lockRankNotifyList:    "notifyList",
+       lockRankSudog:         "sudog",
+       lockRankRwmutexW:      "rwmutexW",
+       lockRankRwmutexR:      "rwmutexR",
+       lockRankRoot:          "root",
+       lockRankItab:          "itab",
+       lockRankReflectOffs:   "reflectOffs",
+       lockRankTraceBuf:      "traceBuf",
        lockRankTraceStrings:  "traceStrings",
+       lockRankFin:           "fin",
+       lockRankGcBitsArenas:  "gcBitsArenas",
+       lockRankMheapSpecial:  "mheapSpecial",
        lockRankMspanSpecial:  "mspanSpecial",
+       lockRankSpanSetSpine:  "spanSetSpine",
        lockRankProfInsert:    "profInsert",
        lockRankProfBlock:     "profBlock",
        lockRankProfMemActive: "profMemActive",
        lockRankProfMemFuture: "profMemFuture",
-       lockRankGcBitsArenas:  "gcBitsArenas",
-       lockRankRoot:          "root",
        lockRankTrace:         "trace",
        lockRankTraceStackTab: "traceStackTab",
-       lockRankNetpollInit:   "netpollInit",
-
-       lockRankRwmutexW: "rwmutexW",
-       lockRankRwmutexR: "rwmutexR",
-
-       lockRankSpanSetSpine: "spanSetSpine",
-       lockRankGscan:        "gscan",
-       lockRankStackpool:    "stackpool",
-       lockRankStackLarge:   "stackLarge",
-       lockRankDefer:        "defer",
-       lockRankSudog:        "sudog",
-
-       lockRankWbufSpans:    "wbufSpans",
-       lockRankMheap:        "mheap",
-       lockRankMheapSpecial: "mheapSpecial",
-
-       lockRankGlobalAlloc:   "globalAlloc.mutex",
-       lockRankPageAllocScav: "pageAlloc.scav.lock",
-
-       lockRankGFree:     "gFree",
-       lockRankHchanLeaf: "hchanLeaf",
-       lockRankPanic:     "panic",
-
-       lockRankNewmHandoff:   "newmHandoff.lock",
-       lockRankDebugPtrmask:  "debugPtrmask.lock",
-       lockRankFaketimeState: "faketimeState.lock",
-       lockRankTicks:         "ticks.lock",
-       lockRankRaceFini:      "raceFiniLock",
-       lockRankPollCache:     "pollCache.lock",
-       lockRankDebug:         "debugLock",
+       lockRankGscan:         "gscan",
+       lockRankStackpool:     "stackpool",
+       lockRankStackLarge:    "stackLarge",
+       lockRankHchanLeaf:     "hchanLeaf",
+       lockRankWbufSpans:     "wbufSpans",
+       lockRankMheap:         "mheap",
+       lockRankGlobalAlloc:   "globalAlloc",
+       lockRankPanic:         "panic",
+       lockRankDeadlock:      "deadlock",
 }
 
 func (rank lockRank) String() string {
@@ -187,74 +122,60 @@ func (rank lockRank) String() string {
        if rank == lockRankLeafRank {
                return "LEAF"
        }
+       if rank < 0 || int(rank) >= len(lockNames) {
+               return "BAD RANK"
+       }
        return lockNames[rank]
 }
 
-// lockPartialOrder is a partial order among the various lock types, listing the
-// immediate ordering that has actually been observed in the runtime. Each entry
-// (which corresponds to a particular lock rank) specifies the list of locks
-// that can already be held immediately "above" it.
+// lockPartialOrder is the transitive closure of the lock rank graph.
+// An entry for rank X lists all of the ranks that can already be held
+// when rank X is acquired.
 //
-// So, for example, the lockRankSched entry shows that all the locks preceding
-// it in rank can actually be held. The allp lock shows that only the sysmon or
-// sched lock can be held immediately above it when it is acquired.
+// Lock ranks that allow self-cycles list themselves.
 var lockPartialOrder [][]lockRank = [][]lockRank{
-       lockRankDummy:         {},
        lockRankSysmon:        {},
        lockRankScavenge:      {lockRankSysmon},
        lockRankForcegc:       {lockRankSysmon},
+       lockRankDefer:         {},
        lockRankSweepWaiters:  {},
        lockRankAssistQueue:   {},
-       lockRankCpuprof:       {},
        lockRankSweep:         {},
        lockRankPollDesc:      {},
-       lockRankSched:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc},
-       lockRankDeadlock:      {lockRankDeadlock},
-       lockRankAllg:          {lockRankSysmon, lockRankSched},
-       lockRankAllp:          {lockRankSysmon, lockRankSched},
-       lockRankTimers:        {lockRankSysmon, lockRankScavenge, lockRankPollDesc, lockRankSched, lockRankAllp, lockRankTimers},
+       lockRankCpuprof:       {},
+       lockRankSched:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof},
+       lockRankAllg:          {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched},
+       lockRankAllp:          {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched},
+       lockRankTimers:        {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllp, lockRankTimers},
+       lockRankNetpollInit:   {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllp, lockRankTimers},
+       lockRankHchan:         {lockRankSysmon, lockRankScavenge, lockRankSweep, lockRankHchan},
+       lockRankNotifyList:    {},
+       lockRankSudog:         {lockRankSysmon, lockRankScavenge, lockRankSweep, lockRankHchan, lockRankNotifyList},
+       lockRankRwmutexW:      {},
+       lockRankRwmutexR:      {lockRankSysmon, lockRankRwmutexW},
+       lockRankRoot:          {},
        lockRankItab:          {},
        lockRankReflectOffs:   {lockRankItab},
-       lockRankHchan:         {lockRankScavenge, lockRankSweep, lockRankHchan},
        lockRankTraceBuf:      {lockRankSysmon, lockRankScavenge},
-       lockRankFin:           {lockRankSysmon, lockRankScavenge, lockRankSched, lockRankAllg, lockRankTimers, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf},
-       lockRankNotifyList:    {},
-       lockRankTraceStrings:  {lockRankTraceBuf},
-       lockRankMspanSpecial:  {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankProfInsert:    {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankProfBlock:     {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankProfMemActive: {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankProfMemFuture: {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings, lockRankProfMemActive},
-       lockRankGcBitsArenas:  {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankRoot:          {},
-       lockRankTrace:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankAssistQueue, lockRankSweep, lockRankSched, lockRankHchan, lockRankTraceBuf, lockRankTraceStrings, lockRankRoot},
-       lockRankTraceStackTab: {lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankSched, lockRankAllg, lockRankTimers, lockRankHchan, lockRankTraceBuf, lockRankFin, lockRankNotifyList, lockRankTraceStrings, lockRankRoot, lockRankTrace},
-       lockRankNetpollInit:   {lockRankTimers},
-
-       lockRankRwmutexW: {},
-       lockRankRwmutexR: {lockRankSysmon, lockRankRwmutexW},
-
-       lockRankSpanSetSpine:  {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankGscan:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankFin, lockRankNotifyList, lockRankTraceStrings, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGcBitsArenas, lockRankRoot, lockRankTrace, lockRankTraceStackTab, lockRankNetpollInit, lockRankSpanSetSpine},
-       lockRankStackpool:     {lockRankSysmon, lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankFin, lockRankNotifyList, lockRankTraceStrings, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGcBitsArenas, lockRankRoot, lockRankTrace, lockRankTraceStackTab, lockRankNetpollInit, lockRankRwmutexR, lockRankSpanSetSpine, lockRankGscan},
-       lockRankStackLarge:    {lockRankSysmon, lockRankAssistQueue, lockRankSched, lockRankItab, lockRankHchan, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGcBitsArenas, lockRankRoot, lockRankSpanSetSpine, lockRankGscan},
-       lockRankDefer:         {},
-       lockRankSudog:         {lockRankHchan, lockRankNotifyList},
-       lockRankWbufSpans:     {lockRankSysmon, lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankAllg, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankFin, lockRankNotifyList, lockRankTraceStrings, lockRankMspanSpecial, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankRoot, lockRankTrace, lockRankGscan, lockRankDefer, lockRankSudog},
-       lockRankMheap:         {lockRankSysmon, lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankFin, lockRankNotifyList, lockRankTraceStrings, lockRankMspanSpecial, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGcBitsArenas, lockRankRoot, lockRankTrace, lockRankSpanSetSpine, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankDefer, lockRankSudog, lockRankWbufSpans},
-       lockRankMheapSpecial:  {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankPollDesc, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankTraceBuf, lockRankNotifyList, lockRankTraceStrings},
-       lockRankGlobalAlloc:   {lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankSpanSetSpine, lockRankMheap, lockRankMheapSpecial},
-       lockRankPageAllocScav: {lockRankMheap},
-
-       lockRankGFree:     {lockRankSched},
-       lockRankHchanLeaf: {lockRankGscan, lockRankHchanLeaf},
-       lockRankPanic:     {lockRankDeadlock}, // plus any other lock held on throw.
-
-       lockRankNewmHandoff:   {},
-       lockRankDebugPtrmask:  {},
-       lockRankFaketimeState: {},
-       lockRankTicks:         {},
-       lockRankRaceFini:      {},
-       lockRankPollCache:     {},
-       lockRankDebug:         {},
+       lockRankTraceStrings:  {lockRankSysmon, lockRankScavenge, lockRankTraceBuf},
+       lockRankFin:           {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankGcBitsArenas:  {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankMheapSpecial:  {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankMspanSpecial:  {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankSpanSetSpine:  {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankProfInsert:    {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankProfBlock:     {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankProfMemActive: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings},
+       lockRankProfMemFuture: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankProfMemActive},
+       lockRankTrace:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin},
+       lockRankTraceStackTab: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankHchan, lockRankNotifyList, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankTrace},
+       lockRankGscan:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab},
+       lockRankStackpool:     {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankRwmutexW, lockRankRwmutexR, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan},
+       lockRankStackLarge:    {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan},
+       lockRankHchanLeaf:     {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan, lockRankHchanLeaf},
+       lockRankWbufSpans:     {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankSudog, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankMspanSpecial, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan},
+       lockRankMheap:         {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankSudog, lockRankRwmutexW, lockRankRwmutexR, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankMspanSpecial, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans},
+       lockRankGlobalAlloc:   {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankPollDesc, lockRankCpuprof, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankNetpollInit, lockRankHchan, lockRankNotifyList, lockRankSudog, lockRankRwmutexW, lockRankRwmutexR, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankGcBitsArenas, lockRankMheapSpecial, lockRankMspanSpecial, lockRankSpanSetSpine, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankTrace, lockRankTraceStackTab, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap},
+       lockRankPanic:         {},
+       lockRankDeadlock:      {lockRankPanic, lockRankDeadlock},
 }
index a170569d6e2a983d5528d59af2c3f3cda2da4a1b..23adad7660dc6da4113a074fd9543e0efcb67da1 100644 (file)
@@ -24,6 +24,9 @@ type lockRankStruct struct {
        pad int
 }
 
+// lockInit(l *mutex, rank int) sets the rank of lock before it is used.
+// If there is no clear place to initialize a lock, then the rank of a lock can be
+// specified during the lock call itself via lockWithRank(l *mutex, rank int).
 func lockInit(l *mutex, rank lockRank) {
        l.rank = rank
 }
index 4b2fc0eaeeaa67cb3a3ec1285032609bfce518cb..a7b1b8df7cde26e5724ddbdb53ba41f2f5d68d93 100644 (file)
@@ -1,41 +1,29 @@
-// Copyright 2021 The Go Authors. All rights reserved.
+// Copyright 2022 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.
 
 package runtime_test
 
 import (
-       . "runtime"
+       "bytes"
+       "internal/testenv"
+       "os"
+       "os/exec"
        "testing"
 )
 
-// Check that the partial order in lockPartialOrder fits within the total order
-// determined by the order of the lockRank constants.
-func TestLockRankPartialOrder(t *testing.T) {
-       for r, list := range LockPartialOrder {
-               rank := LockRank(r)
-               for _, e := range list {
-                       entry := LockRank(e)
-                       if entry > rank {
-                               t.Errorf("lockPartialOrder row %v entry %v is inconsistent with total lock ranking order", rank, entry)
-                       }
-               }
+// Test that the generated code for the lock rank graph is up-to-date.
+func TestLockRankGenerated(t *testing.T) {
+       testenv.MustHaveGoRun(t)
+       want, err := testenv.CleanCmdEnv(exec.Command(testenv.GoToolPath(t), "run", "mklockrank.go")).CombinedOutput()
+       if err != nil {
+               t.Fatal(err)
        }
-}
-
-// Verify that partial order lists are kept sorted. This is a purely cosemetic
-// check to make manual reviews simpler. It does not affect correctness, unlike
-// the above test.
-func TestLockRankPartialOrderSortedEntries(t *testing.T) {
-       for r, list := range LockPartialOrder {
-               rank := LockRank(r)
-               var prev LockRank
-               for _, e := range list {
-                       entry := LockRank(e)
-                       if entry <= prev {
-                               t.Errorf("Partial order for rank %v out of order: %v <= %v in %v", rank, entry, prev, list)
-                       }
-                       prev = entry
-               }
+       got, err := os.ReadFile("lockrank.go")
+       if err != nil {
+               t.Fatal(err)
+       }
+       if !bytes.Equal(want, got) {
+               t.Fatalf("lockrank.go is out of date. Please run go generate.")
        }
 }
index eb24fdb0e8f57b2c897112fa4293a17b538424f1..b044e29d9581a414e00aa07a891d2277456b62dc 100644 (file)
@@ -847,6 +847,11 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
        if size == 0 {
                return unsafe.Pointer(&zerobase)
        }
+
+       // It's possible for any malloc to trigger sweeping, which may in
+       // turn queue finalizers. Record this dynamic lock edge.
+       lockRankMayQueueFinalizer()
+
        userSize := size
        if asanenabled {
                // Refer to ASAN runtime library, the malloc() function allocates extra memory,
@@ -1245,7 +1250,7 @@ func nextSample() uintptr {
        }
        if GOOS == "plan9" {
                // Plan 9 doesn't support floating point in note handler.
-               if g := getg(); g == g.m.gsignal {
+               if gp := getg(); gp == gp.m.gsignal {
                        return nextSampleNoFP()
                }
        }
index a3a6590d65f17d6aa36a705bca924b7db2973402..fcf59b8b3c1743b49e145946dc3d6bcd12d3ee5e 100644 (file)
@@ -2028,11 +2028,10 @@ func getgcmask(ep any) (mask []byte) {
        }
 
        // stack
-       if _g_ := getg(); _g_.m.curg.stack.lo <= uintptr(p) && uintptr(p) < _g_.m.curg.stack.hi {
+       if gp := getg(); gp.m.curg.stack.lo <= uintptr(p) && uintptr(p) < gp.m.curg.stack.hi {
                var frame stkframe
                frame.sp = uintptr(p)
-               _g_ := getg()
-               gentraceback(_g_.m.curg.sched.pc, _g_.m.curg.sched.sp, 0, _g_.m.curg, 0, nil, 1000, getgcmaskcb, noescape(unsafe.Pointer(&frame)), 0)
+               gentraceback(gp.m.curg.sched.pc, gp.m.curg.sched.sp, 0, gp.m.curg, 0, nil, 1000, getgcmaskcb, noescape(unsafe.Pointer(&frame)), 0)
                if frame.fn.valid() {
                        locals, _, _ := getStackMap(&frame, nil, false)
                        if locals.n == 0 {
index f3f3a79fa58c76305f53340f8ad7cace1ba5fda8..a379cce8a3f839ad65d2028b5d9ce3b169bf772d 100644 (file)
@@ -75,6 +75,12 @@ var finalizer1 = [...]byte{
        0<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 0<<5 | 1<<6 | 1<<7,
 }
 
+// lockRankMayQueueFinalizer records the lock ranking effects of a
+// function that may call queuefinalizer.
+func lockRankMayQueueFinalizer() {
+       lockWithRankMayAcquire(&finlock, getLockRank(&finlock))
+}
+
 func queuefinalizer(p unsafe.Pointer, fn *funcval, nret uintptr, fint *_type, ot *ptrtype) {
        if gcphase != _GCoff {
                // Currently we assume that the finalizer queue won't
index 63e04636d7ce86dc8f48946bc17ed08ae3611569..84a7216b108e5b4a50af3bd793628ddcb140a6e7 100644 (file)
@@ -811,21 +811,21 @@ top:
                // result in a deadlock as we attempt to preempt a worker that's
                // trying to preempt us (e.g. for a stack scan).
                casgstatus(gp, _Grunning, _Gwaiting)
-               forEachP(func(_p_ *p) {
+               forEachP(func(pp *p) {
                        // Flush the write barrier buffer, since this may add
                        // work to the gcWork.
-                       wbBufFlush1(_p_)
+                       wbBufFlush1(pp)
 
                        // Flush the gcWork, since this may create global work
                        // and set the flushedWork flag.
                        //
                        // TODO(austin): Break up these workbufs to
                        // better distribute work.
-                       _p_.gcw.dispose()
+                       pp.gcw.dispose()
                        // Collect the flushedWork flag.
-                       if _p_.gcw.flushedWork {
+                       if pp.gcw.flushedWork {
                                atomic.Xadd(&gcMarkDoneFlushed, 1)
-                               _p_.gcw.flushedWork = false
+                               pp.gcw.flushedWork = false
                        }
                })
                casgstatus(gp, _Gwaiting, _Grunning)
@@ -929,11 +929,10 @@ func gcMarkTermination() {
 
        mp := acquirem()
        mp.preemptoff = "gcing"
-       _g_ := getg()
-       _g_.m.traceback = 2
-       gp := _g_.m.curg
-       casgstatus(gp, _Grunning, _Gwaiting)
-       gp.waitreason = waitReasonGarbageCollection
+       mp.traceback = 2
+       curgp := mp.curg
+       casgstatus(curgp, _Grunning, _Gwaiting)
+       curgp.waitreason = waitReasonGarbageCollection
 
        // Run gc on the g0 stack. We do this so that the g stack
        // we're currently running on will no longer change. Cuts
@@ -972,8 +971,8 @@ func gcMarkTermination() {
                gcSweep(work.mode)
        })
 
-       _g_.m.traceback = 0
-       casgstatus(gp, _Gwaiting, _Grunning)
+       mp.traceback = 0
+       casgstatus(curgp, _Gwaiting, _Grunning)
 
        if trace.enabled {
                traceGCDone()
@@ -1075,8 +1074,8 @@ func gcMarkTermination() {
        // is necessary to sweep all spans, we need to ensure all
        // mcaches are flushed before we start the next GC cycle.
        systemstack(func() {
-               forEachP(func(_p_ *p) {
-                       _p_.mcache.prepareForSweep()
+               forEachP(func(pp *p) {
+                       pp.mcache.prepareForSweep()
                })
        })
        // Now that we've swept stale spans in mcaches, they don't
index 74637072c5f2bfa27c8337721cee5c6fac8847ff..551b4c447e62fe000e837fd965c5dd83e4f36166 100644 (file)
@@ -595,15 +595,15 @@ func gcAssistAlloc1(gp *g, scanWork int64) {
        }
        now := nanotime()
        duration := now - startTime
-       _p_ := gp.m.p.ptr()
-       _p_.gcAssistTime += duration
+       pp := gp.m.p.ptr()
+       pp.gcAssistTime += duration
        if trackLimiterEvent {
-               _p_.limiterEvent.stop(limiterEventMarkAssist, now)
+               pp.limiterEvent.stop(limiterEventMarkAssist, now)
        }
-       if _p_.gcAssistTime > gcAssistTimeSlack {
-               gcController.assistTime.Add(_p_.gcAssistTime)
+       if pp.gcAssistTime > gcAssistTimeSlack {
+               gcController.assistTime.Add(pp.gcAssistTime)
                gcCPULimiter.update(now)
-               _p_.gcAssistTime = 0
+               pp.gcAssistTime = 0
        }
 }
 
index 2d9fd277486ee4025d8be0d3079a6f5201a6f18c..77abee73dacda51ad96cb8709cefd57fd146e84f 100644 (file)
@@ -805,9 +805,9 @@ func (c *gcControllerState) enlistWorker() {
        }
 }
 
-// findRunnableGCWorker returns a background mark worker for _p_ if it
+// findRunnableGCWorker returns a background mark worker for pp if it
 // should be run. This must only be called when gcBlackenEnabled != 0.
-func (c *gcControllerState) findRunnableGCWorker(_p_ *p, now int64) (*g, int64) {
+func (c *gcControllerState) findRunnableGCWorker(pp *p, now int64) (*g, int64) {
        if gcBlackenEnabled == 0 {
                throw("gcControllerState.findRunnable: blackening not enabled")
        }
@@ -823,7 +823,7 @@ func (c *gcControllerState) findRunnableGCWorker(_p_ *p, now int64) (*g, int64)
                gcCPULimiter.update(now)
        }
 
-       if !gcMarkWorkAvailable(_p_) {
+       if !gcMarkWorkAvailable(pp) {
                // No work to be done right now. This can happen at
                // the end of the mark phase when there are still
                // assists tapering off. Don't bother running a worker
@@ -864,7 +864,7 @@ func (c *gcControllerState) findRunnableGCWorker(_p_ *p, now int64) (*g, int64)
        if decIfPositive(&c.dedicatedMarkWorkersNeeded) {
                // This P is now dedicated to marking until the end of
                // the concurrent mark phase.
-               _p_.gcMarkWorkerMode = gcMarkWorkerDedicatedMode
+               pp.gcMarkWorkerMode = gcMarkWorkerDedicatedMode
        } else if c.fractionalUtilizationGoal == 0 {
                // No need for fractional workers.
                gcBgMarkWorkerPool.push(&node.node)
@@ -875,13 +875,13 @@ func (c *gcControllerState) findRunnableGCWorker(_p_ *p, now int64) (*g, int64)
                //
                // This should be kept in sync with pollFractionalWorkerExit.
                delta := now - c.markStartTime
-               if delta > 0 && float64(_p_.gcFractionalMarkTime)/float64(delta) > c.fractionalUtilizationGoal {
+               if delta > 0 && float64(pp.gcFractionalMarkTime)/float64(delta) > c.fractionalUtilizationGoal {
                        // Nope. No need to run a fractional worker.
                        gcBgMarkWorkerPool.push(&node.node)
                        return nil, now
                }
                // Run a fractional worker.
-               _p_.gcMarkWorkerMode = gcMarkWorkerFractionalMode
+               pp.gcMarkWorkerMode = gcMarkWorkerFractionalMode
        }
 
        // Run the background mark worker.
index de57f18c4ff6073c34988c22611ac171fea212ef..2ac5d507dde5c820f80a3459d9b5fa2de9281619 100644 (file)
@@ -431,8 +431,8 @@ func (s *mspan) ensureSwept() {
        // Caller must disable preemption.
        // Otherwise when this function returns the span can become unswept again
        // (if GC is triggered on another goroutine).
-       _g_ := getg()
-       if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 {
+       gp := getg()
+       if gp.m.locks == 0 && gp.m.mallocing == 0 && gp != gp.m.g0 {
                throw("mspan.ensureSwept: m is not locked")
        }
 
@@ -470,8 +470,8 @@ func (s *mspan) ensureSwept() {
 func (sl *sweepLocked) sweep(preserve bool) bool {
        // It's critical that we enter this function with preemption disabled,
        // GC must not start while we are in the middle of this function.
-       _g_ := getg()
-       if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 {
+       gp := getg()
+       if gp.m.locks == 0 && gp.m.mallocing == 0 && gp != gp.m.g0 {
                throw("mspan.sweep: m is not locked")
        }
 
diff --git a/src/runtime/mklockrank.go b/src/runtime/mklockrank.go
new file mode 100644 (file)
index 0000000..0d50d60
--- /dev/null
@@ -0,0 +1,360 @@
+// Copyright 2022 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.
+
+//go:build ignore
+
+// mklockrank records the static rank graph of the locks in the
+// runtime and generates the rank checking structures in lockrank.go.
+package main
+
+import (
+       "bytes"
+       "flag"
+       "fmt"
+       "go/format"
+       "internal/dag"
+       "io"
+       "log"
+       "os"
+       "strings"
+)
+
+// ranks describes the lock rank graph. See "go doc internal/dag" for
+// the syntax.
+//
+// "a < b" means a must be acquired before b if both are held
+// (or, if b is held, a cannot be acquired).
+//
+// "NONE < a" means no locks may be held when a is acquired.
+//
+// If a lock is not given a rank, then it is assumed to be a leaf
+// lock, which means no other lock can be acquired while it is held.
+// Therefore, leaf locks do not need to be given an explicit rank.
+//
+// Ranks in all caps are pseudo-nodes that help define order, but do
+// not actually define a rank.
+//
+// TODO: It's often hard to correlate rank names to locks. Change
+// these to be more consistent with the locks they label.
+const ranks = `
+# Sysmon
+NONE
+< sysmon
+< scavenge, forcegc;
+
+# Defer
+NONE < defer;
+
+# GC
+NONE <
+  sweepWaiters,
+  assistQueue,
+  sweep;
+
+# Scheduler, timers, netpoll
+NONE < pollDesc, cpuprof;
+assistQueue,
+  cpuprof,
+  forcegc,
+  pollDesc, # pollDesc can interact with timers, which can lock sched.
+  scavenge,
+  sweep,
+  sweepWaiters
+< sched;
+sched < allg, allp;
+allp < timers;
+timers < netpollInit;
+
+# Channels
+scavenge, sweep < hchan;
+NONE < notifyList;
+hchan, notifyList < sudog;
+
+# RWMutex
+NONE < rwmutexW;
+rwmutexW, sysmon < rwmutexR;
+
+# Semaphores
+NONE < root;
+
+# Itabs
+NONE
+< itab
+< reflectOffs;
+
+# Tracing without a P uses a global trace buffer.
+scavenge
+# Above TRACEGLOBAL can emit a trace event without a P.
+< TRACEGLOBAL
+# Below TRACEGLOBAL manages the global tracing buffer.
+# Note that traceBuf eventually chains to MALLOC, but we never get that far
+# in the situation where there's no P.
+< traceBuf;
+# Starting/stopping tracing traces strings.
+traceBuf < traceStrings;
+
+# Malloc
+allg,
+  hchan,
+  notifyList,
+  reflectOffs,
+  timers,
+  traceStrings
+# Above MALLOC are things that can allocate memory.
+< MALLOC
+# Below MALLOC is the malloc implementation.
+< fin,
+  gcBitsArenas,
+  mheapSpecial,
+  mspanSpecial,
+  spanSetSpine,
+  MPROF;
+
+# Memory profiling
+MPROF < profInsert, profBlock, profMemActive;
+profMemActive < profMemFuture;
+
+# Execution tracer events (with a P)
+hchan,
+  root,
+  sched,
+  traceStrings,
+  notifyList,
+  fin
+# Above TRACE is anything that can create a trace event
+< TRACE
+< trace
+< traceStackTab;
+
+# Stack allocation and copying
+gcBitsArenas,
+  netpollInit,
+  profBlock,
+  profInsert,
+  profMemFuture,
+  spanSetSpine,
+  traceStackTab
+# Anything that can grow the stack can acquire STACKGROW.
+# (Most higher layers imply STACKGROW, like MALLOC.)
+< STACKGROW
+# Below STACKGROW is the stack allocator/copying implementation.
+< gscan;
+gscan, rwmutexR < stackpool;
+gscan < stackLarge;
+# Generally, hchan must be acquired before gscan. But in one case,
+# where we suspend a G and then shrink its stack, syncadjustsudogs
+# can acquire hchan locks while holding gscan. To allow this case,
+# we use hchanLeaf instead of hchan.
+gscan < hchanLeaf;
+
+# Write barrier
+defer,
+  gscan,
+  mspanSpecial,
+  sudog
+# Anything that can have write barriers can acquire WB.
+# Above WB, we can have write barriers.
+< WB
+# Below WB is the write barrier implementation.
+< wbufSpans;
+
+# Span allocator
+stackLarge,
+  stackpool,
+  wbufSpans
+# Above mheap is anything that can call the span allocator.
+< mheap;
+# Below mheap is the span allocator implementation.
+mheap, mheapSpecial < globalAlloc;
+
+# panic is handled specially. It is implicitly below all other locks.
+NONE < panic;
+# deadlock is not acquired while holding panic, but it also needs to be
+# below all other locks.
+panic < deadlock;
+`
+
+// cyclicRanks lists lock ranks that allow multiple locks of the same
+// rank to be acquired simultaneously. The runtime enforces ordering
+// within these ranks using a separate mechanism.
+var cyclicRanks = map[string]bool{
+       // Multiple timers are locked simultaneously in destroy().
+       "timers": true,
+       // Multiple hchans are acquired in hchan.sortkey() order in
+       // select.
+       "hchan": true,
+       // Multiple hchanLeafs are acquired in hchan.sortkey() order in
+       // syncadjustsudogs().
+       "hchanLeaf": true,
+       // The point of the deadlock lock is to deadlock.
+       "deadlock": true,
+}
+
+func main() {
+       flagO := flag.String("o", "", "write to `file` instead of stdout")
+       flagDot := flag.Bool("dot", false, "emit graphviz output instead of Go")
+       flag.Parse()
+       if flag.NArg() != 0 {
+               fmt.Fprintf(os.Stderr, "too many arguments")
+               os.Exit(2)
+       }
+
+       g, err := dag.Parse(ranks)
+       if err != nil {
+               log.Fatal(err)
+       }
+
+       var out []byte
+       if *flagDot {
+               var b bytes.Buffer
+               g.TransitiveReduction()
+               // Add cyclic edges for visualization.
+               for k := range cyclicRanks {
+                       g.AddEdge(k, k)
+               }
+               // Reverse the graph. It's much easier to read this as
+               // a "<" partial order than a ">" partial order. This
+               // ways, locks are acquired from the top going down
+               // and time moves forward over the edges instead of
+               // backward.
+               g.Transpose()
+               generateDot(&b, g)
+               out = b.Bytes()
+       } else {
+               var b bytes.Buffer
+               generateGo(&b, g)
+               out, err = format.Source(b.Bytes())
+               if err != nil {
+                       log.Fatal(err)
+               }
+       }
+
+       if *flagO != "" {
+               err = os.WriteFile(*flagO, out, 0666)
+       } else {
+               _, err = os.Stdout.Write(out)
+       }
+       if err != nil {
+               log.Fatal(err)
+       }
+}
+
+func generateGo(w io.Writer, g *dag.Graph) {
+       fmt.Fprintf(w, `// Code generated by mklockrank.go; DO NOT EDIT.
+
+package runtime
+
+type lockRank int
+
+`)
+
+       // Create numeric ranks.
+       topo := g.Topo()
+       for i, j := 0, len(topo)-1; i < j; i, j = i+1, j-1 {
+               topo[i], topo[j] = topo[j], topo[i]
+       }
+       fmt.Fprintf(w, `
+// Constants representing the ranks of all non-leaf runtime locks, in rank order.
+// Locks with lower rank must be taken before locks with higher rank,
+// in addition to satisfying the partial order in lockPartialOrder.
+// A few ranks allow self-cycles, which are specified in lockPartialOrder.
+const (
+       lockRankUnknown lockRank = iota
+
+`)
+       for _, rank := range topo {
+               if isPseudo(rank) {
+                       fmt.Fprintf(w, "\t// %s\n", rank)
+               } else {
+                       fmt.Fprintf(w, "\t%s\n", cname(rank))
+               }
+       }
+       fmt.Fprintf(w, `)
+
+// lockRankLeafRank is the rank of lock that does not have a declared rank,
+// and hence is a leaf lock.
+const lockRankLeafRank lockRank = 1000
+`)
+
+       // Create string table.
+       fmt.Fprintf(w, `
+// lockNames gives the names associated with each of the above ranks.
+var lockNames = []string{
+`)
+       for _, rank := range topo {
+               if !isPseudo(rank) {
+                       fmt.Fprintf(w, "\t%s: %q,\n", cname(rank), rank)
+               }
+       }
+       fmt.Fprintf(w, `}
+
+func (rank lockRank) String() string {
+       if rank == 0 {
+               return "UNKNOWN"
+       }
+       if rank == lockRankLeafRank {
+               return "LEAF"
+       }
+       if rank < 0 || int(rank) >= len(lockNames) {
+               return "BAD RANK"
+       }
+       return lockNames[rank]
+}
+`)
+
+       // Create partial order structure.
+       fmt.Fprintf(w, `
+// lockPartialOrder is the transitive closure of the lock rank graph.
+// An entry for rank X lists all of the ranks that can already be held
+// when rank X is acquired.
+//
+// Lock ranks that allow self-cycles list themselves.
+var lockPartialOrder [][]lockRank = [][]lockRank{
+`)
+       for _, rank := range topo {
+               if isPseudo(rank) {
+                       continue
+               }
+               list := []string{}
+               for _, before := range g.Edges(rank) {
+                       if !isPseudo(before) {
+                               list = append(list, cname(before))
+                       }
+               }
+               if cyclicRanks[rank] {
+                       list = append(list, cname(rank))
+               }
+
+               fmt.Fprintf(w, "\t%s: {%s},\n", cname(rank), strings.Join(list, ", "))
+       }
+       fmt.Fprintf(w, "}\n")
+}
+
+// cname returns the Go const name for the given lock rank label.
+func cname(label string) string {
+       return "lockRank" + strings.ToUpper(label[:1]) + label[1:]
+}
+
+func isPseudo(label string) bool {
+       return strings.ToUpper(label) == label
+}
+
+// generateDot emits a Graphviz dot representation of g to w.
+func generateDot(w io.Writer, g *dag.Graph) {
+       fmt.Fprintf(w, "digraph g {\n")
+
+       // Define all nodes.
+       for _, node := range g.Nodes {
+               fmt.Fprintf(w, "%q;\n", node)
+       }
+
+       // Create edges.
+       for _, node := range g.Nodes {
+               for _, to := range g.Edges(node) {
+                       fmt.Fprintf(w, "%q -> %q;\n", node, to)
+               }
+       }
+
+       fmt.Fprintf(w, "}\n")
+}
index c4852165830a396c801b78dd425d83d10081149c..5e2aae1bd1616e312e3d61ccde0e89e28d0acf74 100644 (file)
@@ -31,8 +31,8 @@ const msanenabled = true
 //
 //go:nosplit
 func msanread(addr unsafe.Pointer, sz uintptr) {
-       g := getg()
-       if g == nil || g.m == nil || g == g.m.g0 || g == g.m.gsignal {
+       gp := getg()
+       if gp == nil || gp.m == nil || gp == gp.m.g0 || gp == gp.m.gsignal {
                return
        }
        domsanread(addr, sz)
index 39ce0b46a90a663a74e1cce44affe2bd542e50a3..3b7cbf8f1fb767a7084577ce5d04a7d2f39c0bda 100644 (file)
@@ -212,22 +212,22 @@ func wbBufFlush(dst *uintptr, src uintptr) {
 //
 //go:nowritebarrierrec
 //go:systemstack
-func wbBufFlush1(_p_ *p) {
+func wbBufFlush1(pp *p) {
        // Get the buffered pointers.
-       start := uintptr(unsafe.Pointer(&_p_.wbBuf.buf[0]))
-       n := (_p_.wbBuf.next - start) / unsafe.Sizeof(_p_.wbBuf.buf[0])
-       ptrs := _p_.wbBuf.buf[:n]
+       start := uintptr(unsafe.Pointer(&pp.wbBuf.buf[0]))
+       n := (pp.wbBuf.next - start) / unsafe.Sizeof(pp.wbBuf.buf[0])
+       ptrs := pp.wbBuf.buf[:n]
 
        // Poison the buffer to make extra sure nothing is enqueued
        // while we're processing the buffer.
-       _p_.wbBuf.next = 0
+       pp.wbBuf.next = 0
 
        if useCheckmark {
                // Slow path for checkmark mode.
                for _, ptr := range ptrs {
                        shade(ptr)
                }
-               _p_.wbBuf.reset()
+               pp.wbBuf.reset()
                return
        }
 
@@ -245,7 +245,7 @@ func wbBufFlush1(_p_ *p) {
        // could track whether any un-shaded goroutine has used the
        // buffer, or just track globally whether there are any
        // un-shaded stacks and flush after each stack scan.
-       gcw := &_p_.gcw
+       gcw := &pp.gcw
        pos := 0
        for _, ptr := range ptrs {
                if ptr < minLegalPointer {
@@ -286,5 +286,5 @@ func wbBufFlush1(_p_ *p) {
        // Enqueue the greyed objects.
        gcw.putBatch(ptrs[:pos])
 
-       _p_.wbBuf.reset()
+       pp.wbBuf.reset()
 }
index 9ad1caa816187af2274ce942e20f8da7f8038e04..2efc56554cddcceddbb418e91c5fc7a9d7df9289 100644 (file)
@@ -388,11 +388,11 @@ func exit1(code int32)
 
 //go:nosplit
 func exit(code int32) {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                syscall1(&libc_exit, uintptr(code))
                return
        }
@@ -403,11 +403,11 @@ func write2(fd, p uintptr, n int32) int32
 
 //go:nosplit
 func write1(fd uintptr, p unsafe.Pointer, n int32) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                r, errno := syscall3(&libc_write, uintptr(fd), uintptr(p), uintptr(n))
                if int32(r) < 0 {
                        return -int32(errno)
@@ -493,11 +493,11 @@ func sigaction1(sig, new, old uintptr)
 
 //go:nosplit
 func sigaction(sig uintptr, new, old *sigactiont) {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // runtime.libpreinit.
-       if _g_ != nil {
+       if gp != nil {
                r, err := syscall3(&libc_sigaction, sig, uintptr(unsafe.Pointer(new)), uintptr(unsafe.Pointer(old)))
                if int32(r) == -1 {
                        println("Sigaction failed for sig: ", sig, " with error:", hex(err))
@@ -645,11 +645,11 @@ func pthread_attr_init1(attr uintptr) int32
 
 //go:nosplit
 func pthread_attr_init(attr *pthread_attr) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                r, _ := syscall1(&libpthread_attr_init, uintptr(unsafe.Pointer(attr)))
                return int32(r)
        }
@@ -661,11 +661,11 @@ func pthread_attr_setdetachstate1(attr uintptr, state int32) int32
 
 //go:nosplit
 func pthread_attr_setdetachstate(attr *pthread_attr, state int32) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                r, _ := syscall2(&libpthread_attr_setdetachstate, uintptr(unsafe.Pointer(attr)), uintptr(state))
                return int32(r)
        }
@@ -689,11 +689,11 @@ func pthread_attr_setstacksize1(attr uintptr, size uint64) int32
 
 //go:nosplit
 func pthread_attr_setstacksize(attr *pthread_attr, size uint64) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                r, _ := syscall2(&libpthread_attr_setstacksize, uintptr(unsafe.Pointer(attr)), uintptr(size))
                return int32(r)
        }
@@ -705,11 +705,11 @@ func pthread_create1(tid, attr, fn, arg uintptr) int32
 
 //go:nosplit
 func pthread_create(tid *pthread, attr *pthread_attr, fn *funcDescriptor, arg unsafe.Pointer) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of g because without a g during
        // newosproc0.
-       if _g_ != nil {
+       if gp != nil {
                r, _ := syscall4(&libpthread_create, uintptr(unsafe.Pointer(tid)), uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(fn)), uintptr(arg))
                return int32(r)
        }
@@ -723,11 +723,11 @@ func sigprocmask1(how, new, old uintptr)
 
 //go:nosplit
 func sigprocmask(how int32, new, old *sigset) {
-       _g_ := getg()
+       gp := getg()
 
        // Check the validity of m because it might be called during a cgo
        // callback early enough where m isn't available yet.
-       if _g_ != nil && _g_.m != nil {
+       if gp != nil && gp.m != nil {
                r, err := syscall3(&libpthread_sigthreadmask, uintptr(how), uintptr(unsafe.Pointer(new)), uintptr(unsafe.Pointer(old)))
                if int32(r) != 0 {
                        println("syscall sigthreadmask failed: ", hex(err))
index e901b3e9ddfd1b9c2593acd61146c626ceea7156..8c9cbe28ec2fb75196471bc6eb842768f2b836ed 100644 (file)
@@ -14,7 +14,9 @@ import (
 //
 //go:nowritebarrierrec
 func sighandler(_ureg *ureg, note *byte, gp *g) int {
-       _g_ := getg()
+       gsignal := getg()
+       mp := gsignal.m
+
        var t sigTabT
        var docrash bool
        var sig int
@@ -61,7 +63,7 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int {
        if flags&_SigPanic != 0 {
                // Copy the error string from sigtramp's stack into m->notesig so
                // we can reliably access it from the panic routines.
-               memmove(unsafe.Pointer(_g_.m.notesig), unsafe.Pointer(note), uintptr(len(notestr)+1))
+               memmove(unsafe.Pointer(mp.notesig), unsafe.Pointer(note), uintptr(len(notestr)+1))
                gp.sig = uint32(sig)
                gp.sigpc = c.pc()
 
@@ -120,8 +122,8 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int {
                return _NCONT
        }
 Throw:
-       _g_.m.throwing = throwTypeRuntime
-       _g_.m.caughtsig.set(gp)
+       mp.throwing = throwTypeRuntime
+       mp.caughtsig.set(gp)
        startpanic_m()
        print(notestr, "\n")
        print("PC=", hex(c.pc()), "\n")
index 8c85b71532dfd927a488a5c70ac7971e8681b44a..76cf59772bcb050e0e5593d4dedb5f921e76d98b 100644 (file)
@@ -308,18 +308,17 @@ func semacreate(mp *m) {
        }
 
        var sem *semt
-       _g_ := getg()
 
        // Call libc's malloc rather than malloc. This will
        // allocate space on the C heap. We can't call malloc
        // here because it could cause a deadlock.
-       _g_.m.libcall.fn = uintptr(unsafe.Pointer(&libc_malloc))
-       _g_.m.libcall.n = 1
-       _g_.m.scratch = mscratch{}
-       _g_.m.scratch.v[0] = unsafe.Sizeof(*sem)
-       _g_.m.libcall.args = uintptr(unsafe.Pointer(&_g_.m.scratch))
-       asmcgocall(unsafe.Pointer(&asmsysvicall6x), unsafe.Pointer(&_g_.m.libcall))
-       sem = (*semt)(unsafe.Pointer(_g_.m.libcall.r1))
+       mp.libcall.fn = uintptr(unsafe.Pointer(&libc_malloc))
+       mp.libcall.n = 1
+       mp.scratch = mscratch{}
+       mp.scratch.v[0] = unsafe.Sizeof(*sem)
+       mp.libcall.args = uintptr(unsafe.Pointer(&mp.scratch))
+       asmcgocall(unsafe.Pointer(&asmsysvicall6x), unsafe.Pointer(&mp.libcall))
+       sem = (*semt)(unsafe.Pointer(mp.libcall.r1))
        if sem_init(sem, 0, 0) != 0 {
                throw("sem_init")
        }
index 34cc0271f050b70a77549016cad91ce770b87b3a..7ae0e8d3ece718753fe324677bc9a56123f3e021 100644 (file)
@@ -49,13 +49,13 @@ func osyield_no_g() {
 const _SIGSEGV = 0xb
 
 func sigpanic() {
-       g := getg()
-       if !canpanic(g) {
+       gp := getg()
+       if !canpanic() {
                throw("unexpected signal during runtime execution")
        }
 
        // js only invokes the exception handler for memory faults.
-       g.sig = _SIGSEGV
+       gp.sig = _SIGSEGV
        panicmem()
 }
 
index 3cbace38f997018e01e16120334848a97e357e69..bb23adff0763e1ced65fdddb9aa4989b497021b3 100644 (file)
@@ -152,16 +152,16 @@ func semacreate(mp *m) {
 
 //go:nosplit
 func semasleep(ns int64) int32 {
-       _g_ := getg()
+       gp := getg()
        var deadline int64
        if ns >= 0 {
                deadline = nanotime() + ns
        }
 
        for {
-               v := atomic.Load(&_g_.m.waitsemacount)
+               v := atomic.Load(&gp.m.waitsemacount)
                if v > 0 {
-                       if atomic.Cas(&_g_.m.waitsemacount, v, v-1) {
+                       if atomic.Cas(&gp.m.waitsemacount, v, v-1) {
                                return 0 // semaphore acquired
                        }
                        continue
@@ -178,7 +178,7 @@ func semasleep(ns int64) int32 {
                        ts.setNsec(wait)
                        tsp = &ts
                }
-               ret := lwp_park(_CLOCK_MONOTONIC, _TIMER_RELTIME, tsp, 0, unsafe.Pointer(&_g_.m.waitsemacount), nil)
+               ret := lwp_park(_CLOCK_MONOTONIC, _TIMER_RELTIME, tsp, 0, unsafe.Pointer(&gp.m.waitsemacount), nil)
                if ret == _ETIMEDOUT {
                        return -1
                }
@@ -289,8 +289,8 @@ func mpreinit(mp *m) {
 // Called to initialize a new m (including the bootstrap m).
 // Called on the new thread, cannot allocate memory.
 func minit() {
-       _g_ := getg()
-       _g_.m.procid = uint64(lwp_self())
+       gp := getg()
+       gp.m.procid = uint64(lwp_self())
 
        // On NetBSD a thread created by pthread_create inherits the
        // signal stack of the creating thread. We always create a
@@ -299,8 +299,8 @@ func minit() {
        // created in C that calls sigaltstack and then calls a Go
        // function, because we will lose track of the C code's
        // sigaltstack, but it's the best we can do.
-       signalstack(&_g_.m.gsignal.stack)
-       _g_.m.newSigstack = true
+       signalstack(&gp.m.gsignal.stack)
+       gp.m.newSigstack = true
 
        minitSignalMask()
 }
index 2383dc84280f04383a1fbc377361686a3c1dc944..d43414459d2caafff5cc2aa0518b1e235ab9bd6f 100644 (file)
@@ -84,7 +84,7 @@ func semacreate(mp *m) {
 
 //go:nosplit
 func semasleep(ns int64) int32 {
-       _g_ := getg()
+       gp := getg()
 
        // Compute sleep deadline.
        var tsp *timespec
@@ -95,9 +95,9 @@ func semasleep(ns int64) int32 {
        }
 
        for {
-               v := atomic.Load(&_g_.m.waitsemacount)
+               v := atomic.Load(&gp.m.waitsemacount)
                if v > 0 {
-                       if atomic.Cas(&_g_.m.waitsemacount, v, v-1) {
+                       if atomic.Cas(&gp.m.waitsemacount, v, v-1) {
                                return 0 // semaphore acquired
                        }
                        continue
@@ -110,7 +110,7 @@ func semasleep(ns int64) int32 {
                // be examined [...] immediately before blocking. If that int
                // is non-zero then __thrsleep() will immediately return EINTR
                // without blocking."
-               ret := thrsleep(uintptr(unsafe.Pointer(&_g_.m.waitsemacount)), _CLOCK_MONOTONIC, tsp, 0, &_g_.m.waitsemacount)
+               ret := thrsleep(uintptr(unsafe.Pointer(&gp.m.waitsemacount)), _CLOCK_MONOTONIC, tsp, 0, &gp.m.waitsemacount)
                if ret == _EWOULDBLOCK {
                        return -1
                }
index f0e7c6ae70f814e28562182af88604e20377641f..6f4578ff486eb760bc5312a28145ed7bf303e13f 100644 (file)
@@ -75,13 +75,13 @@ func os_sigpipe() {
 }
 
 func sigpanic() {
-       g := getg()
-       if !canpanic(g) {
+       gp := getg()
+       if !canpanic() {
                throw("unexpected signal during runtime execution")
        }
 
-       note := gostringnocopy((*byte)(unsafe.Pointer(g.m.notesig)))
-       switch g.sig {
+       note := gostringnocopy((*byte)(unsafe.Pointer(gp.m.notesig)))
+       switch gp.sig {
        case _SIGRFAULT, _SIGWFAULT:
                i := indexNoFloat(note, "addr=")
                if i >= 0 {
@@ -92,17 +92,17 @@ func sigpanic() {
                        panicmem()
                }
                addr := note[i:]
-               g.sigcode1 = uintptr(atolwhex(addr))
-               if g.sigcode1 < 0x1000 {
+               gp.sigcode1 = uintptr(atolwhex(addr))
+               if gp.sigcode1 < 0x1000 {
                        panicmem()
                }
-               if g.paniconfault {
-                       panicmemAddr(g.sigcode1)
+               if gp.paniconfault {
+                       panicmemAddr(gp.sigcode1)
                }
-               print("unexpected fault address ", hex(g.sigcode1), "\n")
+               print("unexpected fault address ", hex(gp.sigcode1), "\n")
                throw("fault")
        case _SIGTRAP:
-               if g.paniconfault {
+               if gp.paniconfault {
                        panicmem()
                }
                throw(note)
@@ -473,19 +473,19 @@ func semacreate(mp *m) {
 
 //go:nosplit
 func semasleep(ns int64) int {
-       _g_ := getg()
+       gp := getg()
        if ns >= 0 {
                ms := timediv(ns, 1000000, nil)
                if ms == 0 {
                        ms = 1
                }
-               ret := plan9_tsemacquire(&_g_.m.waitsemacount, ms)
+               ret := plan9_tsemacquire(&gp.m.waitsemacount, ms)
                if ret == 1 {
                        return 0 // success
                }
                return -1 // timeout or interrupted
        }
-       for plan9_semacquire(&_g_.m.waitsemacount, 1) < 0 {
+       for plan9_semacquire(&gp.m.waitsemacount, 1) < 0 {
                // interrupted; try again (c.f. lock_sema.go)
        }
        return 0 // success
index 121f2022a4ef2587138a3f059fade138e806fb40..3783e3dedee5723a818d39fa52e7b8827abb1860 100644 (file)
@@ -1190,7 +1190,7 @@ func fatalpanic(msgs *_panic) {
 //
 //go:nowritebarrierrec
 func startpanic_m() bool {
-       _g_ := getg()
+       gp := getg()
        if mheap_.cachealloc.size == 0 { // very early
                print("runtime: panic before malloc heap initialized\n")
        }
@@ -1198,18 +1198,18 @@ func startpanic_m() bool {
        // could happen in a signal handler, or in a throw, or inside
        // malloc itself. We want to catch if an allocation ever does
        // happen (even if we're not in one of these situations).
-       _g_.m.mallocing++
+       gp.m.mallocing++
 
        // If we're dying because of a bad lock count, set it to a
        // good lock count so we don't recursively panic below.
-       if _g_.m.locks < 0 {
-               _g_.m.locks = 1
+       if gp.m.locks < 0 {
+               gp.m.locks = 1
        }
 
-       switch _g_.m.dying {
+       switch gp.m.dying {
        case 0:
                // Setting dying >0 has the side-effect of disabling this G's writebuf.
-               _g_.m.dying = 1
+               gp.m.dying = 1
                atomic.Xadd(&panicking, 1)
                lock(&paniclk)
                if debug.schedtrace > 0 || debug.scheddetail > 0 {
@@ -1220,13 +1220,13 @@ func startpanic_m() bool {
        case 1:
                // Something failed while panicking.
                // Just print a stack trace and exit.
-               _g_.m.dying = 2
+               gp.m.dying = 2
                print("panic during panic\n")
                return false
        case 2:
                // This is a genuine bug in the runtime, we couldn't even
                // print the stack trace successfully.
-               _g_.m.dying = 3
+               gp.m.dying = 3
                print("stack trace unavailable\n")
                exit(4)
                fallthrough
@@ -1240,6 +1240,8 @@ func startpanic_m() bool {
 var didothers bool
 var deadlock mutex
 
+// gp is the crashing g running on this M, but may be a user G, while getg() is
+// always g0.
 func dopanic_m(gp *g, pc, sp uintptr) bool {
        if gp.sig != 0 {
                signame := signame(gp.sig)
@@ -1252,7 +1254,6 @@ func dopanic_m(gp *g, pc, sp uintptr) bool {
        }
 
        level, all, docrash := gotraceback()
-       _g_ := getg()
        if level > 0 {
                if gp != gp.m.curg {
                        all = true
@@ -1261,7 +1262,7 @@ func dopanic_m(gp *g, pc, sp uintptr) bool {
                        print("\n")
                        goroutineheader(gp)
                        traceback(pc, sp, 0, gp)
-               } else if level >= 2 || _g_.m.throwing >= throwTypeRuntime {
+               } else if level >= 2 || gp.m.throwing >= throwTypeRuntime {
                        print("\nruntime stack:\n")
                        traceback(pc, sp, 0, gp)
                }
@@ -1290,29 +1291,32 @@ func dopanic_m(gp *g, pc, sp uintptr) bool {
 // panicking.
 //
 //go:nosplit
-func canpanic(gp *g) bool {
-       // Note that g is m->gsignal, different from gp.
-       // Note also that g->m can change at preemption, so m can go stale
-       // if this function ever makes a function call.
-       _g_ := getg()
-       mp := _g_.m
+func canpanic() bool {
+       gp := getg()
+       mp := acquirem()
 
        // Is it okay for gp to panic instead of crashing the program?
        // Yes, as long as it is running Go code, not runtime code,
        // and not stuck in a system call.
-       if gp == nil || gp != mp.curg {
+       if gp != mp.curg {
+               releasem(mp)
                return false
        }
-       if mp.locks != 0 || mp.mallocing != 0 || mp.throwing != throwTypeNone || mp.preemptoff != "" || mp.dying != 0 {
+       // N.B. mp.locks != 1 instead of 0 to account for acquirem.
+       if mp.locks != 1 || mp.mallocing != 0 || mp.throwing != throwTypeNone || mp.preemptoff != "" || mp.dying != 0 {
+               releasem(mp)
                return false
        }
        status := readgstatus(gp)
        if status&^_Gscan != _Grunning || gp.syscallsp != 0 {
+               releasem(mp)
                return false
        }
        if GOOS == "windows" && mp.libcallsp != 0 {
+               releasem(mp)
                return false
        }
+       releasem(mp)
        return true
 }
 
index 3991a48b10482ddeca5f562d4bf861856b51ba63..0b3d90c5b236dcfc7413b03a7e9fbc86a29fbecc 100644 (file)
@@ -143,11 +143,11 @@ var initSigmask sigset
 
 // The main goroutine.
 func main() {
-       g := getg()
+       mp := getg().m
 
        // Racectx of m0->g0 is used only as the parent of the main goroutine.
        // It must not be used for anything else.
-       g.m.g0.racectx = 0
+       mp.g0.racectx = 0
 
        // Max stack size is 1 GB on 64-bit, 250 MB on 32-bit.
        // Using decimal instead of binary GB and MB because
@@ -180,7 +180,7 @@ func main() {
        // to preserve the lock.
        lockOSThread()
 
-       if g.m != &m0 {
+       if mp != &m0 {
                throw("runtime.main not on m0")
        }
 
@@ -678,9 +678,9 @@ func schedinit() {
 
        // raceinit must be the first call to race detector.
        // In particular, it must be done before mallocinit below calls racemapshadow.
-       _g_ := getg()
+       gp := getg()
        if raceenabled {
-               _g_.racectx, raceprocctx0 = raceinit()
+               gp.racectx, raceprocctx0 = raceinit()
        }
 
        sched.maxmcount = 10000
@@ -694,14 +694,14 @@ func schedinit() {
        cpuinit()      // must run before alginit
        alginit()      // maps, hash, fastrand must not be used before this call
        fastrandinit() // must run before mcommoninit
-       mcommoninit(_g_.m, -1)
+       mcommoninit(gp.m, -1)
        modulesinit()   // provides activeModules
        typelinksinit() // uses maps, activeModules
        itabsinit()     // uses activeModules
        stkobjinit()    // must run before GC starts
 
-       sigsave(&_g_.m.sigmask)
-       initSigmask = _g_.m.sigmask
+       sigsave(&gp.m.sigmask)
+       initSigmask = gp.m.sigmask
 
        if offset := unsafe.Offsetof(sched.timeToRun); offset%8 != 0 {
                println(offset)
@@ -733,8 +733,8 @@ func schedinit() {
        if debug.cgocheck > 1 {
                writeBarrier.cgo = true
                writeBarrier.enabled = true
-               for _, p := range allp {
-                       p.wbBuf.reset()
+               for _, pp := range allp {
+                       pp.wbBuf.reset()
                }
        }
 
@@ -751,9 +751,9 @@ func schedinit() {
 }
 
 func dumpgstatus(gp *g) {
-       _g_ := getg()
-       print("runtime: gp: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
-       print("runtime:  g:  g=", _g_, ", goid=", _g_.goid, ",  g->atomicstatus=", readgstatus(_g_), "\n")
+       thisg := getg()
+       print("runtime:   gp: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
+       print("runtime: getg:  g=", thisg, ", goid=", thisg.goid, ",  g->atomicstatus=", readgstatus(thisg), "\n")
 }
 
 // sched.lock must be held.
@@ -784,10 +784,10 @@ func mReserveID() int64 {
 
 // Pre-allocated ID may be passed as 'id', or omitted by passing -1.
 func mcommoninit(mp *m, id int64) {
-       _g_ := getg()
+       gp := getg()
 
        // g0 stack won't make sense for user (and is not necessary unwindable).
-       if _g_ != _g_.m.g0 {
+       if gp != gp.m.g0 {
                callers(1, mp.createstack[:])
        }
 
@@ -848,7 +848,6 @@ func ready(gp *g, traceskip int, next bool) {
        status := readgstatus(gp)
 
        // Mark runnable.
-       _g_ := getg()
        mp := acquirem() // disable preemption because it can be holding p in a local var
        if status&^_Gscan != _Gwaiting {
                dumpgstatus(gp)
@@ -857,7 +856,7 @@ func ready(gp *g, traceskip int, next bool) {
 
        // status is Gwaiting or Gscanwaiting, make Grunnable and put on runq
        casgstatus(gp, _Gwaiting, _Grunnable)
-       runqput(_g_.m.p.ptr(), gp, next)
+       runqput(mp.p.ptr(), gp, next)
        wakep()
        releasem(mp)
 }
@@ -1177,11 +1176,11 @@ var gcsema uint32 = 1
 // Holding worldsema causes any other goroutines invoking
 // stopTheWorld to block.
 func stopTheWorldWithSema() {
-       _g_ := getg()
+       gp := getg()
 
        // If we hold a lock, then we won't be able to stop another M
        // that is blocked trying to acquire the lock.
-       if _g_.m.locks > 0 {
+       if gp.m.locks > 0 {
                throw("stopTheWorld: holding locks")
        }
 
@@ -1190,28 +1189,28 @@ func stopTheWorldWithSema() {
        atomic.Store(&sched.gcwaiting, 1)
        preemptall()
        // stop current P
-       _g_.m.p.ptr().status = _Pgcstop // Pgcstop is only diagnostic.
+       gp.m.p.ptr().status = _Pgcstop // Pgcstop is only diagnostic.
        sched.stopwait--
        // try to retake all P's in Psyscall status
-       for _, p := range allp {
-               s := p.status
-               if s == _Psyscall && atomic.Cas(&p.status, s, _Pgcstop) {
+       for _, pp := range allp {
+               s := pp.status
+               if s == _Psyscall && atomic.Cas(&pp.status, s, _Pgcstop) {
                        if trace.enabled {
-                               traceGoSysBlock(p)
-                               traceProcStop(p)
+                               traceGoSysBlock(pp)
+                               traceProcStop(pp)
                        }
-                       p.syscalltick++
+                       pp.syscalltick++
                        sched.stopwait--
                }
        }
        // stop idle P's
        now := nanotime()
        for {
-               p, _ := pidleget(now)
-               if p == nil {
+               pp, _ := pidleget(now)
+               if pp == nil {
                        break
                }
-               p.status = _Pgcstop
+               pp.status = _Pgcstop
                sched.stopwait--
        }
        wait := sched.stopwait > 0
@@ -1234,8 +1233,8 @@ func stopTheWorldWithSema() {
        if sched.stopwait != 0 {
                bad = "stopTheWorld: not stopped (stopwait != 0)"
        } else {
-               for _, p := range allp {
-                       if p.status != _Pgcstop {
+               for _, pp := range allp {
+                       if pp.status != _Pgcstop {
                                bad = "stopTheWorld: not stopped (status != _Pgcstop)"
                        }
                }
@@ -1354,9 +1353,9 @@ func mstart()
 //go:nosplit
 //go:nowritebarrierrec
 func mstart0() {
-       _g_ := getg()
+       gp := getg()
 
-       osStack := _g_.stack.lo == 0
+       osStack := gp.stack.lo == 0
        if osStack {
                // Initialize stack bounds from system stack.
                // Cgo may have left stack size in stack.hi.
@@ -1366,25 +1365,25 @@ func mstart0() {
                // We set hi to &size, but there are things above
                // it. The 1024 is supposed to compensate this,
                // but is somewhat arbitrary.
-               size := _g_.stack.hi
+               size := gp.stack.hi
                if size == 0 {
                        size = 8192 * sys.StackGuardMultiplier
                }
-               _g_.stack.hi = uintptr(noescape(unsafe.Pointer(&size)))
-               _g_.stack.lo = _g_.stack.hi - size + 1024
+               gp.stack.hi = uintptr(noescape(unsafe.Pointer(&size)))
+               gp.stack.lo = gp.stack.hi - size + 1024
        }
        // Initialize stack guard so that we can start calling regular
        // Go code.
-       _g_.stackguard0 = _g_.stack.lo + _StackGuard
+       gp.stackguard0 = gp.stack.lo + _StackGuard
        // This is the g0, so we can also call go:systemstack
        // functions, which check stackguard1.
-       _g_.stackguard1 = _g_.stackguard0
+       gp.stackguard1 = gp.stackguard0
        mstart1()
 
        // Exit this thread.
        if mStackIsSystemAllocated() {
                // Windows, Solaris, illumos, Darwin, AIX and Plan 9 always system-allocate
-               // the stack, but put it in _g_.stack before mstart,
+               // the stack, but put it in gp.stack before mstart,
                // so the logic above hasn't set osStack yet.
                osStack = true
        }
@@ -1396,9 +1395,9 @@ func mstart0() {
 //
 //go:noinline
 func mstart1() {
-       _g_ := getg()
+       gp := getg()
 
-       if _g_ != _g_.m.g0 {
+       if gp != gp.m.g0 {
                throw("bad runtime·mstart")
        }
 
@@ -1408,26 +1407,26 @@ func mstart1() {
        // so other calls can reuse the current frame.
        // And goexit0 does a gogo that needs to return from mstart1
        // and let mstart0 exit the thread.
-       _g_.sched.g = guintptr(unsafe.Pointer(_g_))
-       _g_.sched.pc = getcallerpc()
-       _g_.sched.sp = getcallersp()
+       gp.sched.g = guintptr(unsafe.Pointer(gp))
+       gp.sched.pc = getcallerpc()
+       gp.sched.sp = getcallersp()
 
        asminit()
        minit()
 
        // Install signal handlers; after minit so that minit can
        // prepare the thread to be able to handle the signals.
-       if _g_.m == &m0 {
+       if gp.m == &m0 {
                mstartm0()
        }
 
-       if fn := _g_.m.mstartfn; fn != nil {
+       if fn := gp.m.mstartfn; fn != nil {
                fn()
        }
 
-       if _g_.m != &m0 {
-               acquirep(_g_.m.nextp.ptr())
-               _g_.m.nextp = 0
+       if gp.m != &m0 {
+               acquirep(gp.m.nextp.ptr())
+               gp.m.nextp = 0
        }
        schedule()
 }
@@ -1461,7 +1460,7 @@ func mPark() {
 // mexit tears down and exits the current thread.
 //
 // Don't call this directly to exit the thread, since it must run at
-// the top of the thread stack. Instead, use gogo(&_g_.m.g0.sched) to
+// the top of the thread stack. Instead, use gogo(&gp.m.g0.sched) to
 // unwind the stack to the point that exits the thread.
 //
 // It is entered with m.p != nil, so write barriers are allowed. It
@@ -1469,10 +1468,9 @@ func mPark() {
 //
 //go:yeswritebarrierrec
 func mexit(osStack bool) {
-       g := getg()
-       m := g.m
+       mp := getg().m
 
-       if m == &m0 {
+       if mp == &m0 {
                // This is the main thread. Just wedge it.
                //
                // On Linux, exiting the main thread puts the process
@@ -1497,20 +1495,20 @@ func mexit(osStack bool) {
        unminit()
 
        // Free the gsignal stack.
-       if m.gsignal != nil {
-               stackfree(m.gsignal.stack)
+       if mp.gsignal != nil {
+               stackfree(mp.gsignal.stack)
                // On some platforms, when calling into VDSO (e.g. nanotime)
                // we store our g on the gsignal stack, if there is one.
                // Now the stack is freed, unlink it from the m, so we
                // won't write to it when calling VDSO code.
-               m.gsignal = nil
+               mp.gsignal = nil
        }
 
        // Remove m from allm.
        lock(&sched.lock)
        for pprev := &allm; *pprev != nil; pprev = &(*pprev).alllink {
-               if *pprev == m {
-                       *pprev = m.alllink
+               if *pprev == mp {
+                       *pprev = mp.alllink
                        goto found
                }
        }
@@ -1521,17 +1519,17 @@ found:
                //
                // If this is using an OS stack, the OS will free it
                // so there's no need for reaping.
-               atomic.Store(&m.freeWait, 1)
+               atomic.Store(&mp.freeWait, 1)
                // Put m on the free list, though it will not be reaped until
                // freeWait is 0. Note that the free list must not be linked
                // through alllink because some functions walk allm without
                // locking, so may be using alllink.
-               m.freelink = sched.freem
-               sched.freem = m
+               mp.freelink = sched.freem
+               sched.freem = mp
        }
        unlock(&sched.lock)
 
-       atomic.Xadd64(&ncgocall, int64(m.ncgocall))
+       atomic.Xadd64(&ncgocall, int64(mp.ncgocall))
 
        // Release the P.
        handoffp(releasep())
@@ -1548,14 +1546,14 @@ found:
        if GOOS == "darwin" || GOOS == "ios" {
                // Make sure pendingPreemptSignals is correct when an M exits.
                // For #41702.
-               if atomic.Load(&m.signalPending) != 0 {
+               if atomic.Load(&mp.signalPending) != 0 {
                        atomic.Xadd(&pendingPreemptSignals, -1)
                }
        }
 
        // Destroy all allocated resources. After this is called, we may no
        // longer take any locks.
-       mdestroy(m)
+       mdestroy(mp)
 
        if osStack {
                // Return from mstart and let the system thread
@@ -1567,7 +1565,7 @@ found:
        // return to. Exit the thread directly. exitThread will clear
        // m.freeWait when it's done with the stack and the m can be
        // reaped.
-       exitThread(&m.freeWait)
+       exitThread(&mp.freeWait)
 }
 
 // forEachP calls fn(p) for every P p when p reaches a GC safe point.
@@ -1583,7 +1581,7 @@ found:
 //go:systemstack
 func forEachP(fn func(*p)) {
        mp := acquirem()
-       _p_ := getg().m.p.ptr()
+       pp := getg().m.p.ptr()
 
        lock(&sched.lock)
        if sched.safePointWait != 0 {
@@ -1593,9 +1591,9 @@ func forEachP(fn func(*p)) {
        sched.safePointFn = fn
 
        // Ask all Ps to run the safe point function.
-       for _, p := range allp {
-               if p != _p_ {
-                       atomic.Store(&p.runSafePointFn, 1)
+       for _, p2 := range allp {
+               if p2 != pp {
+                       atomic.Store(&p2.runSafePointFn, 1)
                }
        }
        preemptall()
@@ -1617,19 +1615,19 @@ func forEachP(fn func(*p)) {
        unlock(&sched.lock)
 
        // Run fn for the current P.
-       fn(_p_)
+       fn(pp)
 
        // Force Ps currently in _Psyscall into _Pidle and hand them
        // off to induce safe point function execution.
-       for _, p := range allp {
-               s := p.status
-               if s == _Psyscall && p.runSafePointFn == 1 && atomic.Cas(&p.status, s, _Pidle) {
+       for _, p2 := range allp {
+               s := p2.status
+               if s == _Psyscall && p2.runSafePointFn == 1 && atomic.Cas(&p2.status, s, _Pidle) {
                        if trace.enabled {
-                               traceGoSysBlock(p)
-                               traceProcStop(p)
+                               traceGoSysBlock(p2)
+                               traceProcStop(p2)
                        }
-                       p.syscalltick++
-                       handoffp(p)
+                       p2.syscalltick++
+                       handoffp(p2)
                }
        }
 
@@ -1650,8 +1648,8 @@ func forEachP(fn func(*p)) {
        if sched.safePointWait != 0 {
                throw("forEachP: not done")
        }
-       for _, p := range allp {
-               if p.runSafePointFn != 0 {
+       for _, p2 := range allp {
+               if p2.runSafePointFn != 0 {
                        throw("forEachP: P did not run fn")
                }
        }
@@ -1707,20 +1705,20 @@ type cgothreadstart struct {
 // id is optional pre-allocated m ID. Omit by passing -1.
 //
 // This function is allowed to have write barriers even if the caller
-// isn't because it borrows _p_.
+// isn't because it borrows pp.
 //
 //go:yeswritebarrierrec
-func allocm(_p_ *p, fn func(), id int64) *m {
+func allocm(pp *p, fn func(), id int64) *m {
        allocmLock.rlock()
 
-       // The caller owns _p_, but we may borrow (i.e., acquirep) it. We must
+       // The caller owns pp, but we may borrow (i.e., acquirep) it. We must
        // disable preemption to ensure it is not stolen, which would make the
        // caller lose ownership.
        acquirem()
 
-       _g_ := getg()
-       if _g_.m.p == 0 {
-               acquirep(_p_) // temporarily borrow p for mallocs in this function
+       gp := getg()
+       if gp.m.p == 0 {
+               acquirep(pp) // temporarily borrow p for mallocs in this function
        }
 
        // Release the free M list. We need to do this somewhere and
@@ -1761,11 +1759,11 @@ func allocm(_p_ *p, fn func(), id int64) *m {
        }
        mp.g0.m = mp
 
-       if _p_ == _g_.m.p.ptr() {
+       if pp == gp.m.p.ptr() {
                releasep()
        }
 
-       releasem(_g_.m)
+       releasem(gp.m)
        allocmLock.runlock()
        return mp
 }
@@ -1859,10 +1857,10 @@ func needm() {
        // scheduling stack is, but we assume there's at least 32 kB,
        // which is more than enough for us.
        setg(mp.g0)
-       _g_ := getg()
-       _g_.stack.hi = getcallersp() + 1024
-       _g_.stack.lo = getcallersp() - 32*1024
-       _g_.stackguard0 = _g_.stack.lo + _StackGuard
+       gp := getg()
+       gp.stack.hi = getcallersp() + 1024
+       gp.stack.lo = getcallersp() - 32*1024
+       gp.stackguard0 = gp.stack.lo + _StackGuard
 
        // Initialize this thread to use the m.
        asminit()
@@ -2085,7 +2083,7 @@ var newmHandoff struct {
 // id is optional pre-allocated m ID. Omit by passing -1.
 //
 //go:nowritebarrierrec
-func newm(fn func(), _p_ *p, id int64) {
+func newm(fn func(), pp *p, id int64) {
        // allocm adds a new M to allm, but they do not start until created by
        // the OS in newm1 or the template thread.
        //
@@ -2098,8 +2096,8 @@ func newm(fn func(), _p_ *p, id int64) {
        // start.
        acquirem()
 
-       mp := allocm(_p_, fn, id)
-       mp.nextp.set(_p_)
+       mp := allocm(pp, fn, id)
+       mp.nextp.set(pp)
        mp.sigmask = initSigmask
        if gp := getg(); gp != nil && gp.m != nil && (gp.m.lockedExt != 0 || gp.m.incgo) && GOOS != "plan9" {
                // We're on a locked M or a thread that may have been
@@ -2221,24 +2219,24 @@ func templateThread() {
 // Stops execution of the current m until new work is available.
 // Returns with acquired P.
 func stopm() {
-       _g_ := getg()
+       gp := getg()
 
-       if _g_.m.locks != 0 {
+       if gp.m.locks != 0 {
                throw("stopm holding locks")
        }
-       if _g_.m.p != 0 {
+       if gp.m.p != 0 {
                throw("stopm holding p")
        }
-       if _g_.m.spinning {
+       if gp.m.spinning {
                throw("stopm spinning")
        }
 
        lock(&sched.lock)
-       mput(_g_.m)
+       mput(gp.m)
        unlock(&sched.lock)
        mPark()
-       acquirep(_g_.m.nextp.ptr())
-       _g_.m.nextp = 0
+       acquirep(gp.m.nextp.ptr())
+       gp.m.nextp = 0
 }
 
 func mspinning() {
@@ -2258,7 +2256,7 @@ func mspinning() {
 // Must not have write barriers because this may be called without a P.
 //
 //go:nowritebarrierrec
-func startm(_p_ *p, spinning bool) {
+func startm(pp *p, spinning bool) {
        // Disable preemption.
        //
        // Every owned P must have an owner that will eventually stop it in the
@@ -2277,9 +2275,9 @@ func startm(_p_ *p, spinning bool) {
        // disable preemption before acquiring a P from pidleget below.
        mp := acquirem()
        lock(&sched.lock)
-       if _p_ == nil {
-               _p_, _ = pidleget(0)
-               if _p_ == nil {
+       if pp == nil {
+               pp, _ = pidleget(0)
+               if pp == nil {
                        unlock(&sched.lock)
                        if spinning {
                                // The caller incremented nmspinning, but there are no idle Ps,
@@ -2314,8 +2312,8 @@ func startm(_p_ *p, spinning bool) {
                        // The caller incremented nmspinning, so set m.spinning in the new M.
                        fn = mspinning
                }
-               newm(fn, _p_, id)
-               // Ownership transfer of _p_ committed by start in newm.
+               newm(fn, pp, id)
+               // Ownership transfer of pp committed by start in newm.
                // Preemption is now safe.
                releasem(mp)
                return
@@ -2327,14 +2325,14 @@ func startm(_p_ *p, spinning bool) {
        if nmp.nextp != 0 {
                throw("startm: m has p")
        }
-       if spinning && !runqempty(_p_) {
+       if spinning && !runqempty(pp) {
                throw("startm: p has runnable gs")
        }
        // The caller incremented nmspinning, so set m.spinning in the new M.
        nmp.spinning = spinning
-       nmp.nextp.set(_p_)
+       nmp.nextp.set(pp)
        notewakeup(&nmp.park)
-       // Ownership transfer of _p_ committed by wakeup. Preemption is now
+       // Ownership transfer of pp committed by wakeup. Preemption is now
        // safe.
        releasem(mp)
 }
@@ -2343,34 +2341,34 @@ func startm(_p_ *p, spinning bool) {
 // Always runs without a P, so write barriers are not allowed.
 //
 //go:nowritebarrierrec
-func handoffp(_p_ *p) {
+func handoffp(pp *p) {
        // handoffp must start an M in any situation where
-       // findrunnable would return a G to run on _p_.
+       // findrunnable would return a G to run on pp.
 
        // if it has local work, start it straight away
-       if !runqempty(_p_) || sched.runqsize != 0 {
-               startm(_p_, false)
+       if !runqempty(pp) || sched.runqsize != 0 {
+               startm(pp, false)
                return
        }
        // if there's trace work to do, start it straight away
        if (trace.enabled || trace.shutdown) && traceReaderAvailable() {
-               startm(_p_, false)
+               startm(pp, false)
                return
        }
        // if it has GC work, start it straight away
-       if gcBlackenEnabled != 0 && gcMarkWorkAvailable(_p_) {
-               startm(_p_, false)
+       if gcBlackenEnabled != 0 && gcMarkWorkAvailable(pp) {
+               startm(pp, false)
                return
        }
        // no local work, check that there are no spinning/idle M's,
        // otherwise our help is not required
        if atomic.Load(&sched.nmspinning)+atomic.Load(&sched.npidle) == 0 && atomic.Cas(&sched.nmspinning, 0, 1) { // TODO: fast atomic
-               startm(_p_, true)
+               startm(pp, true)
                return
        }
        lock(&sched.lock)
        if sched.gcwaiting != 0 {
-               _p_.status = _Pgcstop
+               pp.status = _Pgcstop
                sched.stopwait--
                if sched.stopwait == 0 {
                        notewakeup(&sched.stopnote)
@@ -2378,8 +2376,8 @@ func handoffp(_p_ *p) {
                unlock(&sched.lock)
                return
        }
-       if _p_.runSafePointFn != 0 && atomic.Cas(&_p_.runSafePointFn, 1, 0) {
-               sched.safePointFn(_p_)
+       if pp.runSafePointFn != 0 && atomic.Cas(&pp.runSafePointFn, 1, 0) {
+               sched.safePointFn(pp)
                sched.safePointWait--
                if sched.safePointWait == 0 {
                        notewakeup(&sched.safePointNote)
@@ -2387,21 +2385,21 @@ func handoffp(_p_ *p) {
        }
        if sched.runqsize != 0 {
                unlock(&sched.lock)
-               startm(_p_, false)
+               startm(pp, false)
                return
        }
        // If this is the last running P and nobody is polling network,
        // need to wakeup another M to poll network.
        if sched.npidle == uint32(gomaxprocs-1) && atomic.Load64(&sched.lastpoll) != 0 {
                unlock(&sched.lock)
-               startm(_p_, false)
+               startm(pp, false)
                return
        }
 
        // The scheduler lock cannot be held when calling wakeNetPoller below
        // because wakeNetPoller may call wakep which may call startm.
-       when := nobarrierWakeTime(_p_)
-       pidleput(_p_, 0)
+       when := nobarrierWakeTime(pp)
+       pidleput(pp, 0)
        unlock(&sched.lock)
 
        if when != 0 {
@@ -2425,27 +2423,27 @@ func wakep() {
 // Stops execution of the current m that is locked to a g until the g is runnable again.
 // Returns with acquired P.
 func stoplockedm() {
-       _g_ := getg()
+       gp := getg()
 
-       if _g_.m.lockedg == 0 || _g_.m.lockedg.ptr().lockedm.ptr() != _g_.m {
+       if gp.m.lockedg == 0 || gp.m.lockedg.ptr().lockedm.ptr() != gp.m {
                throw("stoplockedm: inconsistent locking")
        }
-       if _g_.m.p != 0 {
+       if gp.m.p != 0 {
                // Schedule another M to run this p.
-               _p_ := releasep()
-               handoffp(_p_)
+               pp := releasep()
+               handoffp(pp)
        }
        incidlelocked(1)
        // Wait until another thread schedules lockedg again.
        mPark()
-       status := readgstatus(_g_.m.lockedg.ptr())
+       status := readgstatus(gp.m.lockedg.ptr())
        if status&^_Gscan != _Grunnable {
                print("runtime:stoplockedm: lockedg (atomicstatus=", status, ") is not Grunnable or Gscanrunnable\n")
-               dumpgstatus(_g_.m.lockedg.ptr())
+               dumpgstatus(gp.m.lockedg.ptr())
                throw("stoplockedm: not runnable")
        }
-       acquirep(_g_.m.nextp.ptr())
-       _g_.m.nextp = 0
+       acquirep(gp.m.nextp.ptr())
+       gp.m.nextp = 0
 }
 
 // Schedules the locked m to run the locked gp.
@@ -2453,10 +2451,8 @@ func stoplockedm() {
 //
 //go:nowritebarrierrec
 func startlockedm(gp *g) {
-       _g_ := getg()
-
        mp := gp.lockedm.ptr()
-       if mp == _g_.m {
+       if mp == getg().m {
                throw("startlockedm: locked to me")
        }
        if mp.nextp != 0 {
@@ -2464,8 +2460,8 @@ func startlockedm(gp *g) {
        }
        // directly handoff current P to the locked m
        incidlelocked(-1)
-       _p_ := releasep()
-       mp.nextp.set(_p_)
+       pp := releasep()
+       mp.nextp.set(pp)
        notewakeup(&mp.park)
        stopm()
 }
@@ -2473,22 +2469,22 @@ func startlockedm(gp *g) {
 // Stops the current m for stopTheWorld.
 // Returns when the world is restarted.
 func gcstopm() {
-       _g_ := getg()
+       gp := getg()
 
        if sched.gcwaiting == 0 {
                throw("gcstopm: not waiting for gc")
        }
-       if _g_.m.spinning {
-               _g_.m.spinning = false
+       if gp.m.spinning {
+               gp.m.spinning = false
                // OK to just drop nmspinning here,
                // startTheWorld will unpark threads as necessary.
                if int32(atomic.Xadd(&sched.nmspinning, -1)) < 0 {
                        throw("gcstopm: negative nmspinning")
                }
        }
-       _p_ := releasep()
+       pp := releasep()
        lock(&sched.lock)
-       _p_.status = _Pgcstop
+       pp.status = _Pgcstop
        sched.stopwait--
        if sched.stopwait == 0 {
                notewakeup(&sched.stopnote)
@@ -2507,7 +2503,7 @@ func gcstopm() {
 //
 //go:yeswritebarrierrec
 func execute(gp *g, inheritTime bool) {
-       _g_ := getg()
+       mp := getg().m
 
        if goroutineProfile.active {
                // Make sure that gp has had its stack written out to the goroutine
@@ -2518,19 +2514,19 @@ func execute(gp *g, inheritTime bool) {
 
        // Assign gp.m before entering _Grunning so running Gs have an
        // M.
-       _g_.m.curg = gp
-       gp.m = _g_.m
+       mp.curg = gp
+       gp.m = mp
        casgstatus(gp, _Grunnable, _Grunning)
        gp.waitsince = 0
        gp.preempt = false
        gp.stackguard0 = gp.stack.lo + _StackGuard
        if !inheritTime {
-               _g_.m.p.ptr().schedtick++
+               mp.p.ptr().schedtick++
        }
 
        // Check whether the profiler needs to be turned on or off.
        hz := sched.profilehz
-       if _g_.m.profilehz != hz {
+       if mp.profilehz != hz {
                setThreadCPUProfiler(hz)
        }
 
@@ -2551,19 +2547,19 @@ func execute(gp *g, inheritTime bool) {
 // tryWakeP indicates that the returned goroutine is not normal (GC worker, trace
 // reader) so the caller should try to wake a P.
 func findRunnable() (gp *g, inheritTime, tryWakeP bool) {
-       _g_ := getg()
+       mp := getg().m
 
        // The conditions here and in handoffp must agree: if
        // findrunnable would return a G to run, handoffp must start
        // an M.
 
 top:
-       _p_ := _g_.m.p.ptr()
+       pp := mp.p.ptr()
        if sched.gcwaiting != 0 {
                gcstopm()
                goto top
        }
-       if _p_.runSafePointFn != 0 {
+       if pp.runSafePointFn != 0 {
                runSafePointFn()
        }
 
@@ -2571,7 +2567,7 @@ top:
        // which may steal timers. It's important that between now
        // and then, nothing blocks, so these numbers remain mostly
        // relevant.
-       now, pollUntil, _ := checkTimers(_p_, 0)
+       now, pollUntil, _ := checkTimers(pp, 0)
 
        // Try to schedule the trace reader.
        if trace.enabled || trace.shutdown {
@@ -2585,7 +2581,7 @@ top:
 
        // Try to schedule a GC worker.
        if gcBlackenEnabled != 0 {
-               gp, now = gcController.findRunnableGCWorker(_p_, now)
+               gp, now = gcController.findRunnableGCWorker(pp, now)
                if gp != nil {
                        return gp, false, true
                }
@@ -2594,9 +2590,9 @@ top:
        // Check the global runnable queue once in a while to ensure fairness.
        // Otherwise two goroutines can completely occupy the local runqueue
        // by constantly respawning each other.
-       if _p_.schedtick%61 == 0 && sched.runqsize > 0 {
+       if pp.schedtick%61 == 0 && sched.runqsize > 0 {
                lock(&sched.lock)
-               gp = globrunqget(_p_, 1)
+               gp = globrunqget(pp, 1)
                unlock(&sched.lock)
                if gp != nil {
                        return gp, false, false
@@ -2614,14 +2610,14 @@ top:
        }
 
        // local runq
-       if gp, inheritTime := runqget(_p_); gp != nil {
+       if gp, inheritTime := runqget(pp); gp != nil {
                return gp, inheritTime, false
        }
 
        // global runq
        if sched.runqsize != 0 {
                lock(&sched.lock)
-               gp := globrunqget(_p_, 0)
+               gp := globrunqget(pp, 0)
                unlock(&sched.lock)
                if gp != nil {
                        return gp, false, false
@@ -2653,9 +2649,9 @@ top:
        // This is necessary to prevent excessive CPU consumption when
        // GOMAXPROCS>>1 but the program parallelism is low.
        procs := uint32(gomaxprocs)
-       if _g_.m.spinning || 2*atomic.Load(&sched.nmspinning) < procs-atomic.Load(&sched.npidle) {
-               if !_g_.m.spinning {
-                       _g_.m.spinning = true
+       if mp.spinning || 2*atomic.Load(&sched.nmspinning) < procs-atomic.Load(&sched.npidle) {
+               if !mp.spinning {
+                       mp.spinning = true
                        atomic.Xadd(&sched.nmspinning, 1)
                }
 
@@ -2680,10 +2676,10 @@ top:
        //
        // If we're in the GC mark phase, can safely scan and blacken objects,
        // and have work to do, run idle-time marking rather than give up the P.
-       if gcBlackenEnabled != 0 && gcMarkWorkAvailable(_p_) && gcController.addIdleMarkWorker() {
+       if gcBlackenEnabled != 0 && gcMarkWorkAvailable(pp) && gcController.addIdleMarkWorker() {
                node := (*gcBgMarkWorkerNode)(gcBgMarkWorkerPool.pop())
                if node != nil {
-                       _p_.gcMarkWorkerMode = gcMarkWorkerIdleMode
+                       pp.gcMarkWorkerMode = gcMarkWorkerIdleMode
                        gp := node.gp.ptr()
                        casgstatus(gp, _Gwaiting, _Grunnable)
                        if trace.enabled {
@@ -2722,19 +2718,19 @@ top:
 
        // return P and block
        lock(&sched.lock)
-       if sched.gcwaiting != 0 || _p_.runSafePointFn != 0 {
+       if sched.gcwaiting != 0 || pp.runSafePointFn != 0 {
                unlock(&sched.lock)
                goto top
        }
        if sched.runqsize != 0 {
-               gp := globrunqget(_p_, 0)
+               gp := globrunqget(pp, 0)
                unlock(&sched.lock)
                return gp, false, false
        }
-       if releasep() != _p_ {
+       if releasep() != pp {
                throw("findrunnable: wrong p")
        }
-       now = pidleput(_p_, now)
+       now = pidleput(pp, now)
        unlock(&sched.lock)
 
        // Delicate dance: thread transitions from spinning to non-spinning
@@ -2757,9 +2753,9 @@ top:
        // we also observe no idle Ps it is OK to skip unparking a new worker
        // thread: the system is fully loaded so no spinning threads are required.
        // Also see "Worker thread parking/unparking" comment at the top of the file.
-       wasSpinning := _g_.m.spinning
-       if _g_.m.spinning {
-               _g_.m.spinning = false
+       wasSpinning := mp.spinning
+       if mp.spinning {
+               mp.spinning = false
                if int32(atomic.Xadd(&sched.nmspinning, -1)) < 0 {
                        throw("findrunnable: negative nmspinning")
                }
@@ -2771,23 +2767,23 @@ top:
                // latency. See golang.org/issue/43997.
 
                // Check all runqueues once again.
-               _p_ = checkRunqsNoP(allpSnapshot, idlepMaskSnapshot)
-               if _p_ != nil {
-                       acquirep(_p_)
-                       _g_.m.spinning = true
+               pp = checkRunqsNoP(allpSnapshot, idlepMaskSnapshot)
+               if pp != nil {
+                       acquirep(pp)
+                       mp.spinning = true
                        atomic.Xadd(&sched.nmspinning, 1)
                        goto top
                }
 
                // Check for idle-priority GC work again.
-               _p_, gp = checkIdleGCNoP()
-               if _p_ != nil {
-                       acquirep(_p_)
-                       _g_.m.spinning = true
+               pp, gp = checkIdleGCNoP()
+               if pp != nil {
+                       acquirep(pp)
+                       mp.spinning = true
                        atomic.Xadd(&sched.nmspinning, 1)
 
                        // Run the idle worker.
-                       _p_.gcMarkWorkerMode = gcMarkWorkerIdleMode
+                       pp.gcMarkWorkerMode = gcMarkWorkerIdleMode
                        casgstatus(gp, _Gwaiting, _Grunnable)
                        if trace.enabled {
                                traceGoUnpark(gp, 0)
@@ -2807,10 +2803,10 @@ top:
        // Poll network until next timer.
        if netpollinited() && (atomic.Load(&netpollWaiters) > 0 || pollUntil != 0) && atomic.Xchg64(&sched.lastpoll, 0) != 0 {
                atomic.Store64(&sched.pollUntil, uint64(pollUntil))
-               if _g_.m.p != 0 {
+               if mp.p != 0 {
                        throw("findrunnable: netpoll with p")
                }
-               if _g_.m.spinning {
+               if mp.spinning {
                        throw("findrunnable: netpoll with spinning")
                }
                // Refresh now.
@@ -2836,12 +2832,12 @@ top:
                        goto top
                }
                lock(&sched.lock)
-               _p_, _ = pidleget(now)
+               pp, _ = pidleget(now)
                unlock(&sched.lock)
-               if _p_ == nil {
+               if pp == nil {
                        injectglist(&list)
                } else {
-                       acquirep(_p_)
+                       acquirep(pp)
                        if !list.empty() {
                                gp := list.pop()
                                injectglist(&list)
@@ -2852,7 +2848,7 @@ top:
                                return gp, false, false
                        }
                        if wasSpinning {
-                               _g_.m.spinning = true
+                               mp.spinning = true
                                atomic.Xadd(&sched.nmspinning, 1)
                        }
                        goto top
@@ -3087,11 +3083,11 @@ func wakeNetPoller(when int64) {
 }
 
 func resetspinning() {
-       _g_ := getg()
-       if !_g_.m.spinning {
+       gp := getg()
+       if !gp.m.spinning {
                throw("resetspinning: not a spinning m")
        }
-       _g_.m.spinning = false
+       gp.m.spinning = false
        nmspinning := atomic.Xadd(&sched.nmspinning, -1)
        if int32(nmspinning) < 0 {
                throw("findrunnable: negative nmspinning")
@@ -3175,31 +3171,31 @@ func injectglist(glist *gList) {
 // One round of scheduler: find a runnable goroutine and execute it.
 // Never returns.
 func schedule() {
-       _g_ := getg()
+       mp := getg().m
 
-       if _g_.m.locks != 0 {
+       if mp.locks != 0 {
                throw("schedule: holding locks")
        }
 
-       if _g_.m.lockedg != 0 {
+       if mp.lockedg != 0 {
                stoplockedm()
-               execute(_g_.m.lockedg.ptr(), false) // Never returns.
+               execute(mp.lockedg.ptr(), false) // Never returns.
        }
 
        // We should not schedule away from a g that is executing a cgo call,
        // since the cgo call is using the m's g0 stack.
-       if _g_.m.incgo {
+       if mp.incgo {
                throw("schedule: in cgo")
        }
 
 top:
-       pp := _g_.m.p.ptr()
+       pp := mp.p.ptr()
        pp.preempt = false
 
        // Safety check: if we are spinning, the run queue should be empty.
        // Check this before calling checkTimers, as that might call
        // goready to put a ready goroutine on the local run queue.
-       if _g_.m.spinning && (pp.runnext != 0 || pp.runqhead != pp.runqtail) {
+       if mp.spinning && (pp.runnext != 0 || pp.runqhead != pp.runqtail) {
                throw("schedule: spinning with local work")
        }
 
@@ -3208,7 +3204,7 @@ top:
        // This thread is going to run a goroutine and is not spinning anymore,
        // so if it was marked as spinning we need to reset it now and potentially
        // start a new spinning M.
-       if _g_.m.spinning {
+       if mp.spinning {
                resetspinning()
        }
 
@@ -3252,10 +3248,10 @@ top:
 // readied later, the caller can do other work but eventually should
 // call schedule to restart the scheduling of goroutines on this m.
 func dropg() {
-       _g_ := getg()
+       gp := getg()
 
-       setMNoWB(&_g_.m.curg.m, nil)
-       setGNoWB(&_g_.m.curg, nil)
+       setMNoWB(&gp.m.curg.m, nil)
+       setGNoWB(&gp.m.curg, nil)
 }
 
 // checkTimers runs any timers for the P that are ready.
@@ -3331,19 +3327,19 @@ func parkunlock_c(gp *g, lock unsafe.Pointer) bool {
 
 // park continuation on g0.
 func park_m(gp *g) {
-       _g_ := getg()
+       mp := getg().m
 
        if trace.enabled {
-               traceGoPark(_g_.m.waittraceev, _g_.m.waittraceskip)
+               traceGoPark(mp.waittraceev, mp.waittraceskip)
        }
 
        casgstatus(gp, _Grunning, _Gwaiting)
        dropg()
 
-       if fn := _g_.m.waitunlockf; fn != nil {
-               ok := fn(gp, _g_.m.waitlock)
-               _g_.m.waitunlockf = nil
-               _g_.m.waitlock = nil
+       if fn := mp.waitunlockf; fn != nil {
+               ok := fn(gp, mp.waitlock)
+               mp.waitunlockf = nil
+               mp.waitlock = nil
                if !ok {
                        if trace.enabled {
                                traceGoUnpark(gp, 2)
@@ -3470,18 +3466,18 @@ func goexit1() {
 
 // goexit continuation on g0.
 func goexit0(gp *g) {
-       _g_ := getg()
-       _p_ := _g_.m.p.ptr()
+       mp := getg().m
+       pp := mp.p.ptr()
 
        casgstatus(gp, _Grunning, _Gdead)
-       gcController.addScannableStack(_p_, -int64(gp.stack.hi-gp.stack.lo))
+       gcController.addScannableStack(pp, -int64(gp.stack.hi-gp.stack.lo))
        if isSystemGoroutine(gp, false) {
                atomic.Xadd(&sched.ngsys, -1)
        }
        gp.m = nil
        locked := gp.lockedm != 0
        gp.lockedm = 0
-       _g_.m.lockedg = 0
+       mp.lockedg = 0
        gp.preemptStop = false
        gp.paniconfault = false
        gp._defer = nil // should be true already but just in case.
@@ -3505,15 +3501,15 @@ func goexit0(gp *g) {
        dropg()
 
        if GOARCH == "wasm" { // no threads yet on wasm
-               gfput(_p_, gp)
+               gfput(pp, gp)
                schedule() // never returns
        }
 
-       if _g_.m.lockedInt != 0 {
-               print("invalid m->lockedInt = ", _g_.m.lockedInt, "\n")
+       if mp.lockedInt != 0 {
+               print("invalid m->lockedInt = ", mp.lockedInt, "\n")
                throw("internal lockOSThread error")
        }
-       gfput(_p_, gp)
+       gfput(pp, gp)
        if locked {
                // The goroutine may have locked this thread because
                // it put it in an unusual kernel state. Kill it
@@ -3522,11 +3518,11 @@ func goexit0(gp *g) {
                // Return to mstart, which will release the P and exit
                // the thread.
                if GOOS != "plan9" { // See golang.org/issue/22227.
-                       gogo(&_g_.m.g0.sched)
+                       gogo(&mp.g0.sched)
                } else {
                        // Clear lockedExt on plan9 since we may end up re-using
                        // this thread.
-                       _g_.m.lockedExt = 0
+                       mp.lockedExt = 0
                }
        }
        schedule()
@@ -3541,9 +3537,9 @@ func goexit0(gp *g) {
 //go:nosplit
 //go:nowritebarrierrec
 func save(pc, sp uintptr) {
-       _g_ := getg()
+       gp := getg()
 
-       if _g_ == _g_.m.g0 || _g_ == _g_.m.gsignal {
+       if gp == gp.m.g0 || gp == gp.m.gsignal {
                // m.g0.sched is special and must describe the context
                // for exiting the thread. mstart1 writes to it directly.
                // m.gsignal.sched should not be used at all.
@@ -3552,14 +3548,14 @@ func save(pc, sp uintptr) {
                throw("save on system g not allowed")
        }
 
-       _g_.sched.pc = pc
-       _g_.sched.sp = sp
-       _g_.sched.lr = 0
-       _g_.sched.ret = 0
+       gp.sched.pc = pc
+       gp.sched.sp = sp
+       gp.sched.lr = 0
+       gp.sched.ret = 0
        // We need to ensure ctxt is zero, but can't have a write
        // barrier here. However, it should always already be zero.
        // Assert that.
-       if _g_.sched.ctxt != nil {
+       if gp.sched.ctxt != nil {
                badctxt()
        }
 }
@@ -3594,7 +3590,7 @@ func save(pc, sp uintptr) {
 // when syscall returns we emit traceGoSysExit and when the goroutine starts running
 // (potentially instantly, if exitsyscallfast returns true) we emit traceGoStart.
 // To ensure that traceGoSysExit is emitted strictly after traceGoSysBlock,
-// we remember current value of syscalltick in m (_g_.m.syscalltick = _g_.m.p.ptr().syscalltick),
+// we remember current value of syscalltick in m (gp.m.syscalltick = gp.m.p.ptr().syscalltick),
 // whoever emits traceGoSysBlock increments p.syscalltick afterwards;
 // and we wait for the increment before emitting traceGoSysExit.
 // Note that the increment is done even if tracing is not enabled,
@@ -3602,27 +3598,27 @@ func save(pc, sp uintptr) {
 //
 //go:nosplit
 func reentersyscall(pc, sp uintptr) {
-       _g_ := getg()
+       gp := getg()
 
        // Disable preemption because during this function g is in Gsyscall status,
        // but can have inconsistent g->sched, do not let GC observe it.
-       _g_.m.locks++
+       gp.m.locks++
 
        // Entersyscall must not call any function that might split/grow the stack.
        // (See details in comment above.)
        // Catch calls that might, by replacing the stack guard with something that
        // will trip any stack check and leaving a flag to tell newstack to die.
-       _g_.stackguard0 = stackPreempt
-       _g_.throwsplit = true
+       gp.stackguard0 = stackPreempt
+       gp.throwsplit = true
 
        // Leave SP around for GC and traceback.
        save(pc, sp)
-       _g_.syscallsp = sp
-       _g_.syscallpc = pc
-       casgstatus(_g_, _Grunning, _Gsyscall)
-       if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
+       gp.syscallsp = sp
+       gp.syscallpc = pc
+       casgstatus(gp, _Grunning, _Gsyscall)
+       if gp.syscallsp < gp.stack.lo || gp.stack.hi < gp.syscallsp {
                systemstack(func() {
-                       print("entersyscall inconsistent ", hex(_g_.syscallsp), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
+                       print("entersyscall inconsistent ", hex(gp.syscallsp), " [", hex(gp.stack.lo), ",", hex(gp.stack.hi), "]\n")
                        throw("entersyscall")
                })
        }
@@ -3640,25 +3636,25 @@ func reentersyscall(pc, sp uintptr) {
                save(pc, sp)
        }
 
-       if _g_.m.p.ptr().runSafePointFn != 0 {
+       if gp.m.p.ptr().runSafePointFn != 0 {
                // runSafePointFn may stack split if run on this stack
                systemstack(runSafePointFn)
                save(pc, sp)
        }
 
-       _g_.m.syscalltick = _g_.m.p.ptr().syscalltick
-       _g_.sysblocktraced = true
-       pp := _g_.m.p.ptr()
+       gp.m.syscalltick = gp.m.p.ptr().syscalltick
+       gp.sysblocktraced = true
+       pp := gp.m.p.ptr()
        pp.m = 0
-       _g_.m.oldp.set(pp)
-       _g_.m.p = 0
+       gp.m.oldp.set(pp)
+       gp.m.p = 0
        atomic.Store(&pp.status, _Psyscall)
        if sched.gcwaiting != 0 {
                systemstack(entersyscall_gcwait)
                save(pc, sp)
        }
 
-       _g_.m.locks--
+       gp.m.locks--
 }
 
 // Standard syscall entry used by the go syscall library and normal cgo calls.
@@ -3681,16 +3677,16 @@ func entersyscall_sysmon() {
 }
 
 func entersyscall_gcwait() {
-       _g_ := getg()
-       _p_ := _g_.m.oldp.ptr()
+       gp := getg()
+       pp := gp.m.oldp.ptr()
 
        lock(&sched.lock)
-       if sched.stopwait > 0 && atomic.Cas(&_p_.status, _Psyscall, _Pgcstop) {
+       if sched.stopwait > 0 && atomic.Cas(&pp.status, _Psyscall, _Pgcstop) {
                if trace.enabled {
-                       traceGoSysBlock(_p_)
-                       traceProcStop(_p_)
+                       traceGoSysBlock(pp)
+                       traceProcStop(pp)
                }
-               _p_.syscalltick++
+               pp.syscalltick++
                if sched.stopwait--; sched.stopwait == 0 {
                        notewakeup(&sched.stopnote)
                }
@@ -3702,34 +3698,34 @@ func entersyscall_gcwait() {
 //
 //go:nosplit
 func entersyscallblock() {
-       _g_ := getg()
+       gp := getg()
 
-       _g_.m.locks++ // see comment in entersyscall
-       _g_.throwsplit = true
-       _g_.stackguard0 = stackPreempt // see comment in entersyscall
-       _g_.m.syscalltick = _g_.m.p.ptr().syscalltick
-       _g_.sysblocktraced = true
-       _g_.m.p.ptr().syscalltick++
+       gp.m.locks++ // see comment in entersyscall
+       gp.throwsplit = true
+       gp.stackguard0 = stackPreempt // see comment in entersyscall
+       gp.m.syscalltick = gp.m.p.ptr().syscalltick
+       gp.sysblocktraced = true
+       gp.m.p.ptr().syscalltick++
 
        // Leave SP around for GC and traceback.
        pc := getcallerpc()
        sp := getcallersp()
        save(pc, sp)
-       _g_.syscallsp = _g_.sched.sp
-       _g_.syscallpc = _g_.sched.pc
-       if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
+       gp.syscallsp = gp.sched.sp
+       gp.syscallpc = gp.sched.pc
+       if gp.syscallsp < gp.stack.lo || gp.stack.hi < gp.syscallsp {
                sp1 := sp
-               sp2 := _g_.sched.sp
-               sp3 := _g_.syscallsp
+               sp2 := gp.sched.sp
+               sp3 := gp.syscallsp
                systemstack(func() {
-                       print("entersyscallblock inconsistent ", hex(sp1), " ", hex(sp2), " ", hex(sp3), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
+                       print("entersyscallblock inconsistent ", hex(sp1), " ", hex(sp2), " ", hex(sp3), " [", hex(gp.stack.lo), ",", hex(gp.stack.hi), "]\n")
                        throw("entersyscallblock")
                })
        }
-       casgstatus(_g_, _Grunning, _Gsyscall)
-       if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
+       casgstatus(gp, _Grunning, _Gsyscall)
+       if gp.syscallsp < gp.stack.lo || gp.stack.hi < gp.syscallsp {
                systemstack(func() {
-                       print("entersyscallblock inconsistent ", hex(sp), " ", hex(_g_.sched.sp), " ", hex(_g_.syscallsp), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
+                       print("entersyscallblock inconsistent ", hex(sp), " ", hex(gp.sched.sp), " ", hex(gp.syscallsp), " [", hex(gp.stack.lo), ",", hex(gp.stack.hi), "]\n")
                        throw("entersyscallblock")
                })
        }
@@ -3739,7 +3735,7 @@ func entersyscallblock() {
        // Resave for traceback during blocked call.
        save(getcallerpc(), getcallersp())
 
-       _g_.m.locks--
+       gp.m.locks--
 }
 
 func entersyscallblock_handoff() {
@@ -3763,16 +3759,16 @@ func entersyscallblock_handoff() {
 //go:nowritebarrierrec
 //go:linkname exitsyscall
 func exitsyscall() {
-       _g_ := getg()
+       gp := getg()
 
-       _g_.m.locks++ // see comment in entersyscall
-       if getcallersp() > _g_.syscallsp {
+       gp.m.locks++ // see comment in entersyscall
+       if getcallersp() > gp.syscallsp {
                throw("exitsyscall: syscall frame is no longer valid")
        }
 
-       _g_.waitsince = 0
-       oldp := _g_.m.oldp.ptr()
-       _g_.m.oldp = 0
+       gp.waitsince = 0
+       oldp := gp.m.oldp.ptr()
+       gp.m.oldp = 0
        if exitsyscallfast(oldp) {
                // When exitsyscallfast returns success, we have a P so can now use
                // write barriers
@@ -3781,33 +3777,33 @@ func exitsyscall() {
                        // profile, exactly as it was when the goroutine profiler first
                        // stopped the world.
                        systemstack(func() {
-                               tryRecordGoroutineProfileWB(_g_)
+                               tryRecordGoroutineProfileWB(gp)
                        })
                }
                if trace.enabled {
-                       if oldp != _g_.m.p.ptr() || _g_.m.syscalltick != _g_.m.p.ptr().syscalltick {
+                       if oldp != gp.m.p.ptr() || gp.m.syscalltick != gp.m.p.ptr().syscalltick {
                                systemstack(traceGoStart)
                        }
                }
                // There's a cpu for us, so we can run.
-               _g_.m.p.ptr().syscalltick++
+               gp.m.p.ptr().syscalltick++
                // We need to cas the status and scan before resuming...
-               casgstatus(_g_, _Gsyscall, _Grunning)
+               casgstatus(gp, _Gsyscall, _Grunning)
 
                // Garbage collector isn't running (since we are),
                // so okay to clear syscallsp.
-               _g_.syscallsp = 0
-               _g_.m.locks--
-               if _g_.preempt {
+               gp.syscallsp = 0
+               gp.m.locks--
+               if gp.preempt {
                        // restore the preemption request in case we've cleared it in newstack
-                       _g_.stackguard0 = stackPreempt
+                       gp.stackguard0 = stackPreempt
                } else {
                        // otherwise restore the real _StackGuard, we've spoiled it in entersyscall/entersyscallblock
-                       _g_.stackguard0 = _g_.stack.lo + _StackGuard
+                       gp.stackguard0 = gp.stack.lo + _StackGuard
                }
-               _g_.throwsplit = false
+               gp.throwsplit = false
 
-               if sched.disable.user && !schedEnabled(_g_) {
+               if sched.disable.user && !schedEnabled(gp) {
                        // Scheduling of this goroutine is disabled.
                        Gosched()
                }
@@ -3815,21 +3811,21 @@ func exitsyscall() {
                return
        }
 
-       _g_.sysexitticks = 0
+       gp.sysexitticks = 0
        if trace.enabled {
                // Wait till traceGoSysBlock event is emitted.
                // This ensures consistency of the trace (the goroutine is started after it is blocked).
-               for oldp != nil && oldp.syscalltick == _g_.m.syscalltick {
+               for oldp != nil && oldp.syscalltick == gp.m.syscalltick {
                        osyield()
                }
                // We can't trace syscall exit right now because we don't have a P.
                // Tracing code can invoke write barriers that cannot run without a P.
                // So instead we remember the syscall exit time and emit the event
                // in execute when we have a P.
-               _g_.sysexitticks = cputicks()
+               gp.sysexitticks = cputicks()
        }
 
-       _g_.m.locks--
+       gp.m.locks--
 
        // Call the scheduler.
        mcall(exitsyscall0)
@@ -3840,14 +3836,14 @@ func exitsyscall() {
        // Must wait until now because until gosched returns
        // we don't know for sure that the garbage collector
        // is not running.
-       _g_.syscallsp = 0
-       _g_.m.p.ptr().syscalltick++
-       _g_.throwsplit = false
+       gp.syscallsp = 0
+       gp.m.p.ptr().syscalltick++
+       gp.throwsplit = false
 }
 
 //go:nosplit
 func exitsyscallfast(oldp *p) bool {
-       _g_ := getg()
+       gp := getg()
 
        // Freezetheworld sets stopwait but does not retake P's.
        if sched.stopwait == freezeStopWait {
@@ -3871,7 +3867,7 @@ func exitsyscallfast(oldp *p) bool {
                                if oldp != nil {
                                        // Wait till traceGoSysBlock event is emitted.
                                        // This ensures consistency of the trace (the goroutine is started after it is blocked).
-                                       for oldp.syscalltick == _g_.m.syscalltick {
+                                       for oldp.syscalltick == gp.m.syscalltick {
                                                osyield()
                                        }
                                }
@@ -3891,33 +3887,33 @@ func exitsyscallfast(oldp *p) bool {
 //
 //go:nosplit
 func exitsyscallfast_reacquired() {
-       _g_ := getg()
-       if _g_.m.syscalltick != _g_.m.p.ptr().syscalltick {
+       gp := getg()
+       if gp.m.syscalltick != gp.m.p.ptr().syscalltick {
                if trace.enabled {
-                       // The p was retaken and then enter into syscall again (since _g_.m.syscalltick has changed).
+                       // The p was retaken and then enter into syscall again (since gp.m.syscalltick has changed).
                        // traceGoSysBlock for this syscall was already emitted,
                        // but here we effectively retake the p from the new syscall running on the same p.
                        systemstack(func() {
                                // Denote blocking of the new syscall.
-                               traceGoSysBlock(_g_.m.p.ptr())
+                               traceGoSysBlock(gp.m.p.ptr())
                                // Denote completion of the current syscall.
                                traceGoSysExit(0)
                        })
                }
-               _g_.m.p.ptr().syscalltick++
+               gp.m.p.ptr().syscalltick++
        }
 }
 
 func exitsyscallfast_pidle() bool {
        lock(&sched.lock)
-       _p_, _ := pidleget(0)
-       if _p_ != nil && atomic.Load(&sched.sysmonwait) != 0 {
+       pp, _ := pidleget(0)
+       if pp != nil && atomic.Load(&sched.sysmonwait) != 0 {
                atomic.Store(&sched.sysmonwait, 0)
                notewakeup(&sched.sysmonnote)
        }
        unlock(&sched.lock)
-       if _p_ != nil {
-               acquirep(_p_)
+       if pp != nil {
+               acquirep(pp)
                return true
        }
        return false
@@ -3933,12 +3929,12 @@ func exitsyscall0(gp *g) {
        casgstatus(gp, _Gsyscall, _Grunnable)
        dropg()
        lock(&sched.lock)
-       var _p_ *p
+       var pp *p
        if schedEnabled(gp) {
-               _p_, _ = pidleget(0)
+               pp, _ = pidleget(0)
        }
        var locked bool
-       if _p_ == nil {
+       if pp == nil {
                globrunqput(gp)
 
                // Below, we stoplockedm if gp is locked. globrunqput releases
@@ -3952,8 +3948,8 @@ func exitsyscall0(gp *g) {
                notewakeup(&sched.sysmonnote)
        }
        unlock(&sched.lock)
-       if _p_ != nil {
-               acquirep(_p_)
+       if pp != nil {
+               acquirep(pp)
                execute(gp, false) // Never returns.
        }
        if locked {
@@ -4089,8 +4085,8 @@ func newproc(fn *funcval) {
        systemstack(func() {
                newg := newproc1(fn, gp, pc)
 
-               _p_ := getg().m.p.ptr()
-               runqput(_p_, newg, true)
+               pp := getg().m.p.ptr()
+               runqput(pp, newg, true)
 
                if mainStarted {
                        wakep()
@@ -4102,15 +4098,13 @@ func newproc(fn *funcval) {
 // address of the go statement that created this. The caller is responsible
 // for adding the new g to the scheduler.
 func newproc1(fn *funcval, callergp *g, callerpc uintptr) *g {
-       _g_ := getg()
-
        if fn == nil {
                fatal("go of nil func value")
        }
-       acquirem() // disable preemption because it can be holding p in a local var
 
-       _p_ := _g_.m.p.ptr()
-       newg := gfget(_p_)
+       mp := acquirem() // disable preemption because we hold M and P in local vars.
+       pp := mp.p.ptr()
+       newg := gfget(pp)
        if newg == nil {
                newg = malg(_StackMin)
                casgstatus(newg, _Gidle, _Gdead)
@@ -4148,8 +4142,8 @@ func newproc1(fn *funcval, callergp *g, callerpc uintptr) *g {
                atomic.Xadd(&sched.ngsys, +1)
        } else {
                // Only user goroutines inherit pprof labels.
-               if _g_.m.curg != nil {
-                       newg.labels = _g_.m.curg.labels
+               if mp.curg != nil {
+                       newg.labels = mp.curg.labels
                }
                if goroutineProfile.active {
                        // A concurrent goroutine profile is running. It should include
@@ -4166,18 +4160,18 @@ func newproc1(fn *funcval, callergp *g, callerpc uintptr) *g {
                newg.tracking = true
        }
        casgstatus(newg, _Gdead, _Grunnable)
-       gcController.addScannableStack(_p_, int64(newg.stack.hi-newg.stack.lo))
+       gcController.addScannableStack(pp, int64(newg.stack.hi-newg.stack.lo))
 
-       if _p_.goidcache == _p_.goidcacheend {
+       if pp.goidcache == pp.goidcacheend {
                // Sched.goidgen is the last allocated id,
                // this batch must be [sched.goidgen+1, sched.goidgen+GoidCacheBatch].
                // At startup sched.goidgen=0, so main goroutine receives goid=1.
-               _p_.goidcache = atomic.Xadd64(&sched.goidgen, _GoidCacheBatch)
-               _p_.goidcache -= _GoidCacheBatch - 1
-               _p_.goidcacheend = _p_.goidcache + _GoidCacheBatch
+               pp.goidcache = atomic.Xadd64(&sched.goidgen, _GoidCacheBatch)
+               pp.goidcache -= _GoidCacheBatch - 1
+               pp.goidcacheend = pp.goidcache + _GoidCacheBatch
        }
-       newg.goid = int64(_p_.goidcache)
-       _p_.goidcache++
+       newg.goid = int64(pp.goidcache)
+       pp.goidcache++
        if raceenabled {
                newg.racectx = racegostart(callerpc)
                if newg.labels != nil {
@@ -4189,7 +4183,7 @@ func newproc1(fn *funcval, callergp *g, callerpc uintptr) *g {
        if trace.enabled {
                traceGoCreate(newg, newg.startpc)
        }
-       releasem(_g_.m)
+       releasem(mp)
 
        return newg
 }
@@ -4230,7 +4224,7 @@ func saveAncestors(callergp *g) *[]ancestorInfo {
 
 // Put on gfree list.
 // If local list is too long, transfer a batch to the global list.
-func gfput(_p_ *p, gp *g) {
+func gfput(pp *p, gp *g) {
        if readgstatus(gp) != _Gdead {
                throw("gfput: bad status (not Gdead)")
        }
@@ -4245,17 +4239,17 @@ func gfput(_p_ *p, gp *g) {
                gp.stackguard0 = 0
        }
 
-       _p_.gFree.push(gp)
-       _p_.gFree.n++
-       if _p_.gFree.n >= 64 {
+       pp.gFree.push(gp)
+       pp.gFree.n++
+       if pp.gFree.n >= 64 {
                var (
                        inc      int32
                        stackQ   gQueue
                        noStackQ gQueue
                )
-               for _p_.gFree.n >= 32 {
-                       gp = _p_.gFree.pop()
-                       _p_.gFree.n--
+               for pp.gFree.n >= 32 {
+                       gp = pp.gFree.pop()
+                       pp.gFree.n--
                        if gp.stack.lo == 0 {
                                noStackQ.push(gp)
                        } else {
@@ -4273,12 +4267,12 @@ func gfput(_p_ *p, gp *g) {
 
 // Get from gfree list.
 // If local list is empty, grab a batch from global list.
-func gfget(_p_ *p) *g {
+func gfget(pp *p) *g {
 retry:
-       if _p_.gFree.empty() && (!sched.gFree.stack.empty() || !sched.gFree.noStack.empty()) {
+       if pp.gFree.empty() && (!sched.gFree.stack.empty() || !sched.gFree.noStack.empty()) {
                lock(&sched.gFree.lock)
                // Move a batch of free Gs to the P.
-               for _p_.gFree.n < 32 {
+               for pp.gFree.n < 32 {
                        // Prefer Gs with stacks.
                        gp := sched.gFree.stack.pop()
                        if gp == nil {
@@ -4288,17 +4282,17 @@ retry:
                                }
                        }
                        sched.gFree.n--
-                       _p_.gFree.push(gp)
-                       _p_.gFree.n++
+                       pp.gFree.push(gp)
+                       pp.gFree.n++
                }
                unlock(&sched.gFree.lock)
                goto retry
        }
-       gp := _p_.gFree.pop()
+       gp := pp.gFree.pop()
        if gp == nil {
                return nil
        }
-       _p_.gFree.n--
+       pp.gFree.n--
        if gp.stack.lo != 0 && gp.stack.hi-gp.stack.lo != uintptr(startingStackSize) {
                // Deallocate old stack. We kept it in gfput because it was the
                // right size when the goroutine was put on the free list, but
@@ -4331,15 +4325,15 @@ retry:
 }
 
 // Purge all cached G's from gfree list to the global list.
-func gfpurge(_p_ *p) {
+func gfpurge(pp *p) {
        var (
                inc      int32
                stackQ   gQueue
                noStackQ gQueue
        )
-       for !_p_.gFree.empty() {
-               gp := _p_.gFree.pop()
-               _p_.gFree.n--
+       for !pp.gFree.empty() {
+               gp := pp.gFree.pop()
+               pp.gFree.n--
                if gp.stack.lo == 0 {
                        noStackQ.push(gp)
                } else {
@@ -4368,9 +4362,9 @@ func dolockOSThread() {
        if GOARCH == "wasm" {
                return // no threads on wasm yet
        }
-       _g_ := getg()
-       _g_.m.lockedg.set(_g_)
-       _g_.lockedm.set(_g_.m)
+       gp := getg()
+       gp.m.lockedg.set(gp)
+       gp.lockedm.set(gp.m)
 }
 
 //go:nosplit
@@ -4396,10 +4390,10 @@ func LockOSThread() {
                // while we're in a known-good state.
                startTemplateThread()
        }
-       _g_ := getg()
-       _g_.m.lockedExt++
-       if _g_.m.lockedExt == 0 {
-               _g_.m.lockedExt--
+       gp := getg()
+       gp.m.lockedExt++
+       if gp.m.lockedExt == 0 {
+               gp.m.lockedExt--
                panic("LockOSThread nesting overflow")
        }
        dolockOSThread()
@@ -4420,12 +4414,12 @@ func dounlockOSThread() {
        if GOARCH == "wasm" {
                return // no threads on wasm yet
        }
-       _g_ := getg()
-       if _g_.m.lockedInt != 0 || _g_.m.lockedExt != 0 {
+       gp := getg()
+       if gp.m.lockedInt != 0 || gp.m.lockedExt != 0 {
                return
        }
-       _g_.m.lockedg = 0
-       _g_.lockedm = 0
+       gp.m.lockedg = 0
+       gp.lockedm = 0
 }
 
 //go:nosplit
@@ -4443,21 +4437,21 @@ func dounlockOSThread() {
 // the goroutine locked to the OS thread until the goroutine (and
 // hence the thread) exits.
 func UnlockOSThread() {
-       _g_ := getg()
-       if _g_.m.lockedExt == 0 {
+       gp := getg()
+       if gp.m.lockedExt == 0 {
                return
        }
-       _g_.m.lockedExt--
+       gp.m.lockedExt--
        dounlockOSThread()
 }
 
 //go:nosplit
 func unlockOSThread() {
-       _g_ := getg()
-       if _g_.m.lockedInt == 0 {
+       gp := getg()
+       if gp.m.lockedInt == 0 {
                systemstack(badunlockosthread)
        }
-       _g_.m.lockedInt--
+       gp.m.lockedInt--
        dounlockOSThread()
 }
 
@@ -4467,8 +4461,8 @@ func badunlockosthread() {
 
 func gcount() int32 {
        n := int32(atomic.Loaduintptr(&allglen)) - sched.gFree.n - int32(atomic.Load(&sched.ngsys))
-       for _, _p_ := range allp {
-               n -= _p_.gFree.n
+       for _, pp := range allp {
+               n -= pp.gFree.n
        }
 
        // All these variables can be changed concurrently, so the result can be inconsistent.
@@ -4630,8 +4624,8 @@ func setcpuprofilerate(hz int32) {
 
        // Disable preemption, otherwise we can be rescheduled to another thread
        // that has profiling enabled.
-       _g_ := getg()
-       _g_.m.locks++
+       gp := getg()
+       gp.m.locks++
 
        // Stop profiler on this thread so that it is safe to lock prof.
        // if a profiling signal came in while we had prof locked,
@@ -4655,7 +4649,7 @@ func setcpuprofilerate(hz int32) {
                setThreadCPUProfiler(hz)
        }
 
-       _g_.m.locks--
+       gp.m.locks--
 }
 
 // init initializes pp, which may be a freshly allocated p or a
@@ -4852,32 +4846,32 @@ func procresize(nprocs int32) *p {
                atomicstorep(unsafe.Pointer(&allp[i]), unsafe.Pointer(pp))
        }
 
-       _g_ := getg()
-       if _g_.m.p != 0 && _g_.m.p.ptr().id < nprocs {
+       gp := getg()
+       if gp.m.p != 0 && gp.m.p.ptr().id < nprocs {
                // continue to use the current P
-               _g_.m.p.ptr().status = _Prunning
-               _g_.m.p.ptr().mcache.prepareForSweep()
+               gp.m.p.ptr().status = _Prunning
+               gp.m.p.ptr().mcache.prepareForSweep()
        } else {
                // release the current P and acquire allp[0].
                //
                // We must do this before destroying our current P
                // because p.destroy itself has write barriers, so we
                // need to do that from a valid P.
-               if _g_.m.p != 0 {
+               if gp.m.p != 0 {
                        if trace.enabled {
                                // Pretend that we were descheduled
                                // and then scheduled again to keep
                                // the trace sane.
                                traceGoSched()
-                               traceProcStop(_g_.m.p.ptr())
+                               traceProcStop(gp.m.p.ptr())
                        }
-                       _g_.m.p.ptr().m = 0
+                       gp.m.p.ptr().m = 0
                }
-               _g_.m.p = 0
-               p := allp[0]
-               p.m = 0
-               p.status = _Pidle
-               acquirep(p)
+               gp.m.p = 0
+               pp := allp[0]
+               pp.m = 0
+               pp.status = _Pidle
+               acquirep(pp)
                if trace.enabled {
                        traceGoStart()
                }
@@ -4888,8 +4882,8 @@ func procresize(nprocs int32) *p {
 
        // release resources from unused P's
        for i := nprocs; i < old; i++ {
-               p := allp[i]
-               p.destroy()
+               pp := allp[i]
+               pp.destroy()
                // can't free P itself because it can be referenced by an M in syscall
        }
 
@@ -4904,17 +4898,17 @@ func procresize(nprocs int32) *p {
 
        var runnablePs *p
        for i := nprocs - 1; i >= 0; i-- {
-               p := allp[i]
-               if _g_.m.p.ptr() == p {
+               pp := allp[i]
+               if gp.m.p.ptr() == pp {
                        continue
                }
-               p.status = _Pidle
-               if runqempty(p) {
-                       pidleput(p, now)
+               pp.status = _Pidle
+               if runqempty(pp) {
+                       pidleput(pp, now)
                } else {
-                       p.m.set(mget())
-                       p.link.set(runnablePs)
-                       runnablePs = p
+                       pp.m.set(mget())
+                       pp.link.set(runnablePs)
+                       runnablePs = pp
                }
        }
        stealOrder.reset(uint32(nprocs))
@@ -4930,18 +4924,18 @@ func procresize(nprocs int32) *p {
 // Associate p and the current m.
 //
 // This function is allowed to have write barriers even if the caller
-// isn't because it immediately acquires _p_.
+// isn't because it immediately acquires pp.
 //
 //go:yeswritebarrierrec
-func acquirep(_p_ *p) {
+func acquirep(pp *p) {
        // Do the part that isn't allowed to have write barriers.
-       wirep(_p_)
+       wirep(pp)
 
        // Have p; write barriers now allowed.
 
        // Perform deferred mcache flush before this P can allocate
        // from a potentially stale mcache.
-       _p_.mcache.prepareForSweep()
+       pp.mcache.prepareForSweep()
 
        if trace.enabled {
                traceProcStart()
@@ -4949,49 +4943,49 @@ func acquirep(_p_ *p) {
 }
 
 // wirep is the first step of acquirep, which actually associates the
-// current M to _p_. This is broken out so we can disallow write
+// current M to pp. This is broken out so we can disallow write
 // barriers for this part, since we don't yet have a P.
 //
 //go:nowritebarrierrec
 //go:nosplit
-func wirep(_p_ *p) {
-       _g_ := getg()
+func wirep(pp *p) {
+       gp := getg()
 
-       if _g_.m.p != 0 {
+       if gp.m.p != 0 {
                throw("wirep: already in go")
        }
-       if _p_.m != 0 || _p_.status != _Pidle {
+       if pp.m != 0 || pp.status != _Pidle {
                id := int64(0)
-               if _p_.m != 0 {
-                       id = _p_.m.ptr().id
+               if pp.m != 0 {
+                       id = pp.m.ptr().id
                }
-               print("wirep: p->m=", _p_.m, "(", id, ") p->status=", _p_.status, "\n")
+               print("wirep: p->m=", pp.m, "(", id, ") p->status=", pp.status, "\n")
                throw("wirep: invalid p state")
        }
-       _g_.m.p.set(_p_)
-       _p_.m.set(_g_.m)
-       _p_.status = _Prunning
+       gp.m.p.set(pp)
+       pp.m.set(gp.m)
+       pp.status = _Prunning
 }
 
 // Disassociate p and the current m.
 func releasep() *p {
-       _g_ := getg()
+       gp := getg()
 
-       if _g_.m.p == 0 {
+       if gp.m.p == 0 {
                throw("releasep: invalid arg")
        }
-       _p_ := _g_.m.p.ptr()
-       if _p_.m.ptr() != _g_.m || _p_.status != _Prunning {
-               print("releasep: m=", _g_.m, " m->p=", _g_.m.p.ptr(), " p->m=", hex(_p_.m), " p->status=", _p_.status, "\n")
+       pp := gp.m.p.ptr()
+       if pp.m.ptr() != gp.m || pp.status != _Prunning {
+               print("releasep: m=", gp.m, " m->p=", gp.m.p.ptr(), " p->m=", hex(pp.m), " p->status=", pp.status, "\n")
                throw("releasep: invalid p state")
        }
        if trace.enabled {
-               traceProcStop(_g_.m.p.ptr())
+               traceProcStop(gp.m.p.ptr())
        }
-       _g_.m.p = 0
-       _p_.m = 0
-       _p_.status = _Pidle
-       return _p_
+       gp.m.p = 0
+       pp.m = 0
+       pp.status = _Pidle
+       return pp
 }
 
 func incidlelocked(v int32) {
@@ -5099,8 +5093,8 @@ func checkdead() {
        }
 
        // There are no goroutines running, so we can look at the P's.
-       for _, _p_ := range allp {
-               if len(_p_.timers) > 0 {
+       for _, pp := range allp {
+               if len(pp.timers) > 0 {
                        return
                }
        }
@@ -5289,23 +5283,23 @@ func retake(now int64) uint32 {
        // temporarily drop the allpLock. Hence, we need to re-fetch
        // allp each time around the loop.
        for i := 0; i < len(allp); i++ {
-               _p_ := allp[i]
-               if _p_ == nil {
+               pp := allp[i]
+               if pp == nil {
                        // This can happen if procresize has grown
                        // allp but not yet created new Ps.
                        continue
                }
-               pd := &_p_.sysmontick
-               s := _p_.status
+               pd := &pp.sysmontick
+               s := pp.status
                sysretake := false
                if s == _Prunning || s == _Psyscall {
                        // Preempt G if it's running for too long.
-                       t := int64(_p_.schedtick)
+                       t := int64(pp.schedtick)
                        if int64(pd.schedtick) != t {
                                pd.schedtick = uint32(t)
                                pd.schedwhen = now
                        } else if pd.schedwhen+forcePreemptNS <= now {
-                               preemptone(_p_)
+                               preemptone(pp)
                                // In case of syscall, preemptone() doesn't
                                // work, because there is no M wired to P.
                                sysretake = true
@@ -5313,7 +5307,7 @@ func retake(now int64) uint32 {
                }
                if s == _Psyscall {
                        // Retake P from syscall if it's there for more than 1 sysmon tick (at least 20us).
-                       t := int64(_p_.syscalltick)
+                       t := int64(pp.syscalltick)
                        if !sysretake && int64(pd.syscalltick) != t {
                                pd.syscalltick = uint32(t)
                                pd.syscallwhen = now
@@ -5322,7 +5316,7 @@ func retake(now int64) uint32 {
                        // On the one hand we don't want to retake Ps if there is no other work to do,
                        // but on the other hand we want to retake them eventually
                        // because they can prevent the sysmon thread from deep sleep.
-                       if runqempty(_p_) && atomic.Load(&sched.nmspinning)+atomic.Load(&sched.npidle) > 0 && pd.syscallwhen+10*1000*1000 > now {
+                       if runqempty(pp) && atomic.Load(&sched.nmspinning)+atomic.Load(&sched.npidle) > 0 && pd.syscallwhen+10*1000*1000 > now {
                                continue
                        }
                        // Drop allpLock so we can take sched.lock.
@@ -5332,14 +5326,14 @@ func retake(now int64) uint32 {
                        // Otherwise the M from which we retake can exit the syscall,
                        // increment nmidle and report deadlock.
                        incidlelocked(-1)
-                       if atomic.Cas(&_p_.status, s, _Pidle) {
+                       if atomic.Cas(&pp.status, s, _Pidle) {
                                if trace.enabled {
-                                       traceGoSysBlock(_p_)
-                                       traceProcStop(_p_)
+                                       traceGoSysBlock(pp)
+                                       traceProcStop(pp)
                                }
                                n++
-                               _p_.syscalltick++
-                               handoffp(_p_)
+                               pp.syscalltick++
+                               handoffp(pp)
                        }
                        incidlelocked(1)
                        lock(&allpLock)
@@ -5356,11 +5350,11 @@ func retake(now int64) uint32 {
 // Returns true if preemption request was issued to at least one goroutine.
 func preemptall() bool {
        res := false
-       for _, _p_ := range allp {
-               if _p_.status != _Prunning {
+       for _, pp := range allp {
+               if pp.status != _Prunning {
                        continue
                }
-               if preemptone(_p_) {
+               if preemptone(pp) {
                        res = true
                }
        }
@@ -5377,8 +5371,8 @@ func preemptall() bool {
 // The actual preemption will happen at some point in the future
 // and will be indicated by the gp->status no longer being
 // Grunning
-func preemptone(_p_ *p) bool {
-       mp := _p_.m.ptr()
+func preemptone(pp *p) bool {
+       mp := pp.m.ptr()
        if mp == nil || mp == getg().m {
                return false
        }
@@ -5397,7 +5391,7 @@ func preemptone(_p_ *p) bool {
 
        // Request an async preemption of this P.
        if preemptMSupported && debug.asyncpreemptoff == 0 {
-               _p_.preempt = true
+               pp.preempt = true
                preemptM(mp)
        }
 
@@ -5420,16 +5414,16 @@ func schedtrace(detailed bool) {
        // We must be careful while reading data from P's, M's and G's.
        // Even if we hold schedlock, most data can be changed concurrently.
        // E.g. (p->m ? p->m->id : -1) can crash if p->m changes from non-nil to nil.
-       for i, _p_ := range allp {
-               mp := _p_.m.ptr()
-               h := atomic.Load(&_p_.runqhead)
-               t := atomic.Load(&_p_.runqtail)
+       for i, pp := range allp {
+               mp := pp.m.ptr()
+               h := atomic.Load(&pp.runqhead)
+               t := atomic.Load(&pp.runqtail)
                if detailed {
                        id := int64(-1)
                        if mp != nil {
                                id = mp.id
                        }
-                       print("  P", i, ": status=", _p_.status, " schedtick=", _p_.schedtick, " syscalltick=", _p_.syscalltick, " m=", id, " runqsize=", t-h, " gfreecnt=", _p_.gFree.n, " timerslen=", len(_p_.timers), "\n")
+                       print("  P", i, ": status=", pp.status, " schedtick=", pp.schedtick, " syscalltick=", pp.syscalltick, " m=", id, " runqsize=", t-h, " gfreecnt=", pp.gFree.n, " timerslen=", len(pp.timers), "\n")
                } else {
                        // In non-detailed mode format lengths of per-P run queues as:
                        // [len1 len2 len3 len4]
@@ -5450,12 +5444,12 @@ func schedtrace(detailed bool) {
        }
 
        for mp := allm; mp != nil; mp = mp.alllink {
-               _p_ := mp.p.ptr()
+               pp := mp.p.ptr()
                gp := mp.curg
                lockedg := mp.lockedg.ptr()
                id1 := int32(-1)
-               if _p_ != nil {
-                       id1 = _p_.id
+               if pp != nil {
+                       id1 = pp.id
                }
                id2 := int64(-1)
                if gp != nil {
@@ -5592,7 +5586,7 @@ func globrunqputbatch(batch *gQueue, n int32) {
 
 // Try get a batch of G's from the global runnable queue.
 // sched.lock must be held.
-func globrunqget(_p_ *p, max int32) *g {
+func globrunqget(pp *p, max int32) *g {
        assertLockHeld(&sched.lock)
 
        if sched.runqsize == 0 {
@@ -5606,8 +5600,8 @@ func globrunqget(_p_ *p, max int32) *g {
        if max > 0 && n > max {
                n = max
        }
-       if n > int32(len(_p_.runq))/2 {
-               n = int32(len(_p_.runq)) / 2
+       if n > int32(len(pp.runq))/2 {
+               n = int32(len(pp.runq)) / 2
        }
 
        sched.runqsize -= n
@@ -5616,7 +5610,7 @@ func globrunqget(_p_ *p, max int32) *g {
        n--
        for ; n > 0; n-- {
                gp1 := sched.runq.pop()
-               runqput(_p_, gp1, false)
+               runqput(pp, gp1, false)
        }
        return gp
 }
@@ -5696,21 +5690,21 @@ func updateTimerPMask(pp *p) {
 // May run during STW, so write barriers are not allowed.
 //
 //go:nowritebarrierrec
-func pidleput(_p_ *p, now int64) int64 {
+func pidleput(pp *p, now int64) int64 {
        assertLockHeld(&sched.lock)
 
-       if !runqempty(_p_) {
+       if !runqempty(pp) {
                throw("pidleput: P has non-empty run queue")
        }
        if now == 0 {
                now = nanotime()
        }
-       updateTimerPMask(_p_) // clear if there are no timers.
-       idlepMask.set(_p_.id)
-       _p_.link = sched.pidle
-       sched.pidle.set(_p_)
+       updateTimerPMask(pp) // clear if there are no timers.
+       idlepMask.set(pp.id)
+       pp.link = sched.pidle
+       sched.pidle.set(pp)
        atomic.Xadd(&sched.npidle, 1)
-       if !_p_.limiterEvent.start(limiterEventIdle, now) {
+       if !pp.limiterEvent.start(limiterEventIdle, now) {
                throw("must be able to track idle limiter event")
        }
        return now
@@ -5726,33 +5720,33 @@ func pidleput(_p_ *p, now int64) int64 {
 func pidleget(now int64) (*p, int64) {
        assertLockHeld(&sched.lock)
 
-       _p_ := sched.pidle.ptr()
-       if _p_ != nil {
+       pp := sched.pidle.ptr()
+       if pp != nil {
                // Timer may get added at any time now.
                if now == 0 {
                        now = nanotime()
                }
-               timerpMask.set(_p_.id)
-               idlepMask.clear(_p_.id)
-               sched.pidle = _p_.link
+               timerpMask.set(pp.id)
+               idlepMask.clear(pp.id)
+               sched.pidle = pp.link
                atomic.Xadd(&sched.npidle, -1)
-               _p_.limiterEvent.stop(limiterEventIdle, now)
+               pp.limiterEvent.stop(limiterEventIdle, now)
        }
-       return _p_, now
+       return pp, now
 }
 
-// runqempty reports whether _p_ has no Gs on its local run queue.
+// runqempty reports whether pp has no Gs on its local run queue.
 // It never returns true spuriously.
-func runqempty(_p_ *p) bool {
-       // Defend against a race where 1) _p_ has G1 in runqnext but runqhead == runqtail,
-       // 2) runqput on _p_ kicks G1 to the runq, 3) runqget on _p_ empties runqnext.
+func runqempty(pp *p) bool {
+       // Defend against a race where 1) pp has G1 in runqnext but runqhead == runqtail,
+       // 2) runqput on pp kicks G1 to the runq, 3) runqget on pp empties runqnext.
        // Simply observing that runqhead == runqtail and then observing that runqnext == nil
        // does not mean the queue is empty.
        for {
-               head := atomic.Load(&_p_.runqhead)
-               tail := atomic.Load(&_p_.runqtail)
-               runnext := atomic.Loaduintptr((*uintptr)(unsafe.Pointer(&_p_.runnext)))
-               if tail == atomic.Load(&_p_.runqtail) {
+               head := atomic.Load(&pp.runqhead)
+               tail := atomic.Load(&pp.runqtail)
+               runnext := atomic.Loaduintptr((*uintptr)(unsafe.Pointer(&pp.runnext)))
+               if tail == atomic.Load(&pp.runqtail) {
                        return head == tail && runnext == 0
                }
        }
@@ -5771,18 +5765,18 @@ const randomizeScheduler = raceenabled
 
 // runqput tries to put g on the local runnable queue.
 // If next is false, runqput adds g to the tail of the runnable queue.
-// If next is true, runqput puts g in the _p_.runnext slot.
+// If next is true, runqput puts g in the pp.runnext slot.
 // If the run queue is full, runnext puts g on the global queue.
 // Executed only by the owner P.
-func runqput(_p_ *p, gp *g, next bool) {
+func runqput(pp *p, gp *g, next bool) {
        if randomizeScheduler && next && fastrandn(2) == 0 {
                next = false
        }
 
        if next {
        retryNext:
-               oldnext := _p_.runnext
-               if !_p_.runnext.cas(oldnext, guintptr(unsafe.Pointer(gp))) {
+               oldnext := pp.runnext
+               if !pp.runnext.cas(oldnext, guintptr(unsafe.Pointer(gp))) {
                        goto retryNext
                }
                if oldnext == 0 {
@@ -5793,14 +5787,14 @@ func runqput(_p_ *p, gp *g, next bool) {
        }
 
 retry:
-       h := atomic.LoadAcq(&_p_.runqhead) // load-acquire, synchronize with consumers
-       t := _p_.runqtail
-       if t-h < uint32(len(_p_.runq)) {
-               _p_.runq[t%uint32(len(_p_.runq))].set(gp)
-               atomic.StoreRel(&_p_.runqtail, t+1) // store-release, makes the item available for consumption
+       h := atomic.LoadAcq(&pp.runqhead) // load-acquire, synchronize with consumers
+       t := pp.runqtail
+       if t-h < uint32(len(pp.runq)) {
+               pp.runq[t%uint32(len(pp.runq))].set(gp)
+               atomic.StoreRel(&pp.runqtail, t+1) // store-release, makes the item available for consumption
                return
        }
-       if runqputslow(_p_, gp, h, t) {
+       if runqputslow(pp, gp, h, t) {
                return
        }
        // the queue is not full, now the put above must succeed
@@ -5809,19 +5803,19 @@ retry:
 
 // Put g and a batch of work from local runnable queue on global queue.
 // Executed only by the owner P.
-func runqputslow(_p_ *p, gp *g, h, t uint32) bool {
-       var batch [len(_p_.runq)/2 + 1]*g
+func runqputslow(pp *p, gp *g, h, t uint32) bool {
+       var batch [len(pp.runq)/2 + 1]*g
 
        // First, grab a batch from local queue.
        n := t - h
        n = n / 2
-       if n != uint32(len(_p_.runq)/2) {
+       if n != uint32(len(pp.runq)/2) {
                throw("runqputslow: queue is not full")
        }
        for i := uint32(0); i < n; i++ {
-               batch[i] = _p_.runq[(h+i)%uint32(len(_p_.runq))].ptr()
+               batch[i] = pp.runq[(h+i)%uint32(len(pp.runq))].ptr()
        }
-       if !atomic.CasRel(&_p_.runqhead, h, h+n) { // cas-release, commits consume
+       if !atomic.CasRel(&pp.runqhead, h, h+n) { // cas-release, commits consume
                return false
        }
        batch[n] = gp
@@ -5886,50 +5880,50 @@ func runqputbatch(pp *p, q *gQueue, qsize int) {
 // If inheritTime is true, gp should inherit the remaining time in the
 // current time slice. Otherwise, it should start a new time slice.
 // Executed only by the owner P.
-func runqget(_p_ *p) (gp *g, inheritTime bool) {
+func runqget(pp *p) (gp *g, inheritTime bool) {
        // If there's a runnext, it's the next G to run.
-       next := _p_.runnext
+       next := pp.runnext
        // If the runnext is non-0 and the CAS fails, it could only have been stolen by another P,
        // because other Ps can race to set runnext to 0, but only the current P can set it to non-0.
        // Hence, there's no need to retry this CAS if it falls.
-       if next != 0 && _p_.runnext.cas(next, 0) {
+       if next != 0 && pp.runnext.cas(next, 0) {
                return next.ptr(), true
        }
 
        for {
-               h := atomic.LoadAcq(&_p_.runqhead) // load-acquire, synchronize with other consumers
-               t := _p_.runqtail
+               h := atomic.LoadAcq(&pp.runqhead) // load-acquire, synchronize with other consumers
+               t := pp.runqtail
                if t == h {
                        return nil, false
                }
-               gp := _p_.runq[h%uint32(len(_p_.runq))].ptr()
-               if atomic.CasRel(&_p_.runqhead, h, h+1) { // cas-release, commits consume
+               gp := pp.runq[h%uint32(len(pp.runq))].ptr()
+               if atomic.CasRel(&pp.runqhead, h, h+1) { // cas-release, commits consume
                        return gp, false
                }
        }
 }
 
-// runqdrain drains the local runnable queue of _p_ and returns all goroutines in it.
+// runqdrain drains the local runnable queue of pp and returns all goroutines in it.
 // Executed only by the owner P.
-func runqdrain(_p_ *p) (drainQ gQueue, n uint32) {
-       oldNext := _p_.runnext
-       if oldNext != 0 && _p_.runnext.cas(oldNext, 0) {
+func runqdrain(pp *p) (drainQ gQueue, n uint32) {
+       oldNext := pp.runnext
+       if oldNext != 0 && pp.runnext.cas(oldNext, 0) {
                drainQ.pushBack(oldNext.ptr())
                n++
        }
 
 retry:
-       h := atomic.LoadAcq(&_p_.runqhead) // load-acquire, synchronize with other consumers
-       t := _p_.runqtail
+       h := atomic.LoadAcq(&pp.runqhead) // load-acquire, synchronize with other consumers
+       t := pp.runqtail
        qn := t - h
        if qn == 0 {
                return
        }
-       if qn > uint32(len(_p_.runq)) { // read inconsistent h and t
+       if qn > uint32(len(pp.runq)) { // read inconsistent h and t
                goto retry
        }
 
-       if !atomic.CasRel(&_p_.runqhead, h, h+qn) { // cas-release, commits consume
+       if !atomic.CasRel(&pp.runqhead, h, h+qn) { // cas-release, commits consume
                goto retry
        }
 
@@ -5941,34 +5935,34 @@ retry:
        // meanwhile, other P's can't access to all G's in local P's runnable queue and steal them.
        // See https://groups.google.com/g/golang-dev/c/0pTKxEKhHSc/m/6Q85QjdVBQAJ for more details.
        for i := uint32(0); i < qn; i++ {
-               gp := _p_.runq[(h+i)%uint32(len(_p_.runq))].ptr()
+               gp := pp.runq[(h+i)%uint32(len(pp.runq))].ptr()
                drainQ.pushBack(gp)
                n++
        }
        return
 }
 
-// Grabs a batch of goroutines from _p_'s runnable queue into batch.
+// Grabs a batch of goroutines from pp's runnable queue into batch.
 // Batch is a ring buffer starting at batchHead.
 // Returns number of grabbed goroutines.
 // Can be executed by any P.
-func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool) uint32 {
+func runqgrab(pp *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool) uint32 {
        for {
-               h := atomic.LoadAcq(&_p_.runqhead) // load-acquire, synchronize with other consumers
-               t := atomic.LoadAcq(&_p_.runqtail) // load-acquire, synchronize with the producer
+               h := atomic.LoadAcq(&pp.runqhead) // load-acquire, synchronize with other consumers
+               t := atomic.LoadAcq(&pp.runqtail) // load-acquire, synchronize with the producer
                n := t - h
                n = n - n/2
                if n == 0 {
                        if stealRunNextG {
-                               // Try to steal from _p_.runnext.
-                               if next := _p_.runnext; next != 0 {
-                                       if _p_.status == _Prunning {
-                                               // Sleep to ensure that _p_ isn't about to run the g
+                               // Try to steal from pp.runnext.
+                               if next := pp.runnext; next != 0 {
+                                       if pp.status == _Prunning {
+                                               // Sleep to ensure that pp isn't about to run the g
                                                // we are about to steal.
                                                // The important use case here is when the g running
-                                               // on _p_ ready()s another g and then almost
+                                               // on pp ready()s another g and then almost
                                                // immediately blocks. Instead of stealing runnext
-                                               // in this window, back off to give _p_ a chance to
+                                               // in this window, back off to give pp a chance to
                                                // schedule runnext. This will avoid thrashing gs
                                                // between different Ps.
                                                // A sync chan send/recv takes ~50ns as of time of
@@ -5982,7 +5976,7 @@ func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool
                                                        osyield()
                                                }
                                        }
-                                       if !_p_.runnext.cas(next, 0) {
+                                       if !pp.runnext.cas(next, 0) {
                                                continue
                                        }
                                        batch[batchHead%uint32(len(batch))] = next
@@ -5991,14 +5985,14 @@ func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool
                        }
                        return 0
                }
-               if n > uint32(len(_p_.runq)/2) { // read inconsistent h and t
+               if n > uint32(len(pp.runq)/2) { // read inconsistent h and t
                        continue
                }
                for i := uint32(0); i < n; i++ {
-                       g := _p_.runq[(h+i)%uint32(len(_p_.runq))]
+                       g := pp.runq[(h+i)%uint32(len(pp.runq))]
                        batch[(batchHead+i)%uint32(len(batch))] = g
                }
-               if atomic.CasRel(&_p_.runqhead, h, h+n) { // cas-release, commits consume
+               if atomic.CasRel(&pp.runqhead, h, h+n) { // cas-release, commits consume
                        return n
                }
        }
@@ -6007,22 +6001,22 @@ func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool
 // Steal half of elements from local runnable queue of p2
 // and put onto local runnable queue of p.
 // Returns one of the stolen elements (or nil if failed).
-func runqsteal(_p_, p2 *p, stealRunNextG bool) *g {
-       t := _p_.runqtail
-       n := runqgrab(p2, &_p_.runq, t, stealRunNextG)
+func runqsteal(pp, p2 *p, stealRunNextG bool) *g {
+       t := pp.runqtail
+       n := runqgrab(p2, &pp.runq, t, stealRunNextG)
        if n == 0 {
                return nil
        }
        n--
-       gp := _p_.runq[(t+n)%uint32(len(_p_.runq))].ptr()
+       gp := pp.runq[(t+n)%uint32(len(pp.runq))].ptr()
        if n == 0 {
                return gp
        }
-       h := atomic.LoadAcq(&_p_.runqhead) // load-acquire, synchronize with consumers
-       if t-h+n >= uint32(len(_p_.runq)) {
+       h := atomic.LoadAcq(&pp.runqhead) // load-acquire, synchronize with consumers
+       if t-h+n >= uint32(len(pp.runq)) {
                throw("runqsteal: runq overflow")
        }
-       atomic.StoreRel(&_p_.runqtail, t+n) // store-release, makes the item available for consumption
+       atomic.StoreRel(&pp.runqtail, t+n) // store-release, makes the item available for consumption
        return gp
 }
 
@@ -6143,8 +6137,8 @@ func setMaxThreads(in int) (out int) {
 
 //go:nosplit
 func procPin() int {
-       _g_ := getg()
-       mp := _g_.m
+       gp := getg()
+       mp := gp.m
 
        mp.locks++
        return int(mp.p.ptr().id)
@@ -6152,8 +6146,8 @@ func procPin() int {
 
 //go:nosplit
 func procUnpin() {
-       _g_ := getg()
-       _g_.m.locks--
+       gp := getg()
+       gp.m.locks--
 }
 
 //go:linkname sync_runtime_procPin sync.runtime_procPin
index 4694288082bc91f8a19be812e65374f15abe330b..a67c8b9cdfabc20e714261aa1b2daecb966626de 100644 (file)
@@ -67,21 +67,21 @@ func RaceReleaseMerge(addr unsafe.Pointer) {
 // Non-synchronization events (memory accesses, function entry/exit) still affect
 // the race detector.
 func RaceDisable() {
-       _g_ := getg()
-       if _g_.raceignore == 0 {
-               racecall(&__tsan_go_ignore_sync_begin, _g_.racectx, 0, 0, 0)
+       gp := getg()
+       if gp.raceignore == 0 {
+               racecall(&__tsan_go_ignore_sync_begin, gp.racectx, 0, 0, 0)
        }
-       _g_.raceignore++
+       gp.raceignore++
 }
 
 //go:nosplit
 
 // RaceEnable re-enables handling of race events in the current goroutine.
 func RaceEnable() {
-       _g_ := getg()
-       _g_.raceignore--
-       if _g_.raceignore == 0 {
-               racecall(&__tsan_go_ignore_sync_end, _g_.racectx, 0, 0, 0)
+       gp := getg()
+       gp.raceignore--
+       if gp.raceignore == 0 {
+               racecall(&__tsan_go_ignore_sync_end, gp.racectx, 0, 0, 0)
        }
 }
 
@@ -453,12 +453,12 @@ func racefree(p unsafe.Pointer, sz uintptr) {
 
 //go:nosplit
 func racegostart(pc uintptr) uintptr {
-       _g_ := getg()
+       gp := getg()
        var spawng *g
-       if _g_.m.curg != nil {
-               spawng = _g_.m.curg
+       if gp.m.curg != nil {
+               spawng = gp.m.curg
        } else {
-               spawng = _g_
+               spawng = gp
        }
 
        var racectx uintptr
@@ -478,8 +478,8 @@ func racectxend(racectx uintptr) {
 
 //go:nosplit
 func racewriterangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
-       _g_ := getg()
-       if _g_ != _g_.m.curg {
+       gp := getg()
+       if gp != gp.m.curg {
                // The call is coming from manual instrumentation of Go code running on g0/gsignal.
                // Not interesting.
                return
@@ -495,8 +495,8 @@ func racewriterangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
 
 //go:nosplit
 func racereadrangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
-       _g_ := getg()
-       if _g_ != _g_.m.curg {
+       gp := getg()
+       if gp != gp.m.curg {
                // The call is coming from manual instrumentation of Go code running on g0/gsignal.
                // Not interesting.
                return
index 1b213f19340548be21e383f7d808853b2f934b8d..7ecb2a52eec2b65899477851dcf7bf36aea24a36 100644 (file)
@@ -15,8 +15,8 @@ func setMaxStack(in int) (out int) {
 
 //go:linkname setPanicOnFault runtime/debug.setPanicOnFault
 func setPanicOnFault(new bool) (old bool) {
-       _g_ := getg()
-       old = _g_.paniconfault
-       _g_.paniconfault = new
+       gp := getg()
+       old = gp.paniconfault
+       gp.paniconfault = new
        return old
 }
index 2cf93abefa9150dc433d750a643c45859a822317..e9fd56b46d24fe96073f20a40fe96d2f5fe22a7e 100644 (file)
@@ -12,6 +12,7 @@ import (
 //go:generate go run wincallback.go
 //go:generate go run mkduff.go
 //go:generate go run mkfastlog2table.go
+//go:generate go run mklockrank.go -o lockrank.go
 
 var ticks ticksType
 
index e307901fc24f9b5b9de37a02c1b138236bf16663..b0a458d18719b50f66f640a3e2551a54fda09152 100644 (file)
@@ -35,13 +35,13 @@ var traceback_env uint32
 //
 //go:nosplit
 func gotraceback() (level int32, all, crash bool) {
-       _g_ := getg()
+       gp := getg()
        t := atomic.Load(&traceback_cache)
        crash = t&tracebackCrash != 0
-       all = _g_.m.throwing >= throwTypeUser || t&tracebackAll != 0
-       if _g_.m.traceback != 0 {
-               level = int32(_g_.m.traceback)
-       } else if _g_.m.throwing >= throwTypeRuntime {
+       all = gp.m.throwing >= throwTypeUser || t&tracebackAll != 0
+       if gp.m.traceback != 0 {
+               level = int32(gp.m.traceback)
+       } else if gp.m.throwing >= throwTypeRuntime {
                // Always include runtime frames in runtime throws unless
                // otherwise overridden by m.traceback.
                level = 2
@@ -474,18 +474,18 @@ func timediv(v int64, div int32, rem *int32) int32 {
 
 //go:nosplit
 func acquirem() *m {
-       _g_ := getg()
-       _g_.m.locks++
-       return _g_.m
+       gp := getg()
+       gp.m.locks++
+       return gp.m
 }
 
 //go:nosplit
 func releasem(mp *m) {
-       _g_ := getg()
+       gp := getg()
        mp.locks--
-       if mp.locks == 0 && _g_.preempt {
+       if mp.locks == 0 && gp.preempt {
                // restore the preemption request in case we've cleared it in newstack
-               _g_.stackguard0 = stackPreempt
+               gp.stackguard0 = stackPreempt
        }
 }
 
index 0bdd01b0861bc8491e47396d0640834f0cd26226..018a8dbaa68f54bb576c34547820ba39ebfd9a41 100644 (file)
@@ -18,7 +18,12 @@ import (
        "unsafe"
 )
 
-var flagQuick = flag.Bool("quick", false, "skip slow tests, for second run in all.bash")
+// flagQuick is set by the -quick option to skip some relatively slow tests.
+// This is used by the cmd/dist test runtime:cpu124.
+// The cmd/dist test passes both -test.short and -quick;
+// there are tests that only check testing.Short, and those tests will
+// not be skipped if only -quick is used.
+var flagQuick = flag.Bool("quick", false, "skip slow tests, for cmd/dist test runtime:cpu124")
 
 func init() {
        // We're testing the runtime, so make tracebacks show things
index 0be499b2e9a9a9c9946e87df13b19129f93a47d3..f241df69f18cc9a25aee0fa4c31e838d6ce1b307 100644 (file)
@@ -433,9 +433,9 @@ func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) {
                return
        }
        c := &sigctxt{info, ctx}
-       g := sigFetchG(c)
-       setg(g)
-       if g == nil {
+       gp := sigFetchG(c)
+       setg(gp)
+       if gp == nil {
                if sig == _SIGPROF {
                        // Some platforms (Linux) have per-thread timers, which we use in
                        // combination with the process-wide timer. Avoid double-counting.
@@ -462,22 +462,22 @@ func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) {
                return
        }
 
-       setg(g.m.gsignal)
+       setg(gp.m.gsignal)
 
        // If some non-Go code called sigaltstack, adjust.
        var gsignalStack gsignalStack
-       setStack := adjustSignalStack(sig, g.m, &gsignalStack)
+       setStack := adjustSignalStack(sig, gp.m, &gsignalStack)
        if setStack {
-               g.m.gsignal.stktopsp = getcallersp()
+               gp.m.gsignal.stktopsp = getcallersp()
        }
 
-       if g.stackguard0 == stackFork {
+       if gp.stackguard0 == stackFork {
                signalDuringFork(sig)
        }
 
        c.fixsigcode(sig)
-       sighandler(sig, info, ctx, g)
-       setg(g)
+       sighandler(sig, info, ctx, gp)
+       setg(gp)
        if setStack {
                restoreGsignalStack(&gsignalStack)
        }
@@ -596,7 +596,7 @@ var testSigusr1 func(gp *g) bool
 
 // sighandler is invoked when a signal occurs. The global g will be
 // set to a gsignal goroutine and we will be running on the alternate
-// signal stack. The parameter g will be the value of the global g
+// signal stack. The parameter gp will be the value of the global g
 // when the signal occurred. The sig, info, and ctxt parameters are
 // from the system signal handler: they are the parameters passed when
 // the SA is passed to the sigaction system call.
@@ -606,9 +606,11 @@ var testSigusr1 func(gp *g) bool
 //
 //go:nowritebarrierrec
 func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-       _g_ := getg()
+       // The g executing the signal handler. This is almost always
+       // mp.gsignal. See delayedSignal for an exception.
+       gsignal := getg()
+       mp := gsignal.m
        c := &sigctxt{info, ctxt}
-       mp := _g_.m
 
        // Cgo TSAN (not the Go race detector) intercepts signals and calls the
        // signal handler at a later time. When the signal handler is called, the
@@ -620,7 +622,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
        // signal delivery. We use that as an indicator of delayed signals.
        // For delayed signals, the handler is called on the g0 stack (see
        // adjustSignalStack).
-       delayedSignal := *cgo_yield != nil && mp != nil && _g_.stack == mp.g0.stack
+       delayedSignal := *cgo_yield != nil && mp != nil && gsignal.stack == mp.g0.stack
 
        if sig == _SIGPROF {
                // Some platforms (Linux) have per-thread timers, which we use in
@@ -710,8 +712,8 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
                return
        }
 
-       _g_.m.throwing = throwTypeRuntime
-       _g_.m.caughtsig.set(gp)
+       mp.throwing = throwTypeRuntime
+       mp.caughtsig.set(gp)
 
        if crashing == 0 {
                startpanic_m()
@@ -723,12 +725,12 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
                print("Signal ", sig, "\n")
        }
 
-       print("PC=", hex(c.sigpc()), " m=", _g_.m.id, " sigcode=", c.sigcode(), "\n")
-       if _g_.m.incgo && gp == _g_.m.g0 && _g_.m.curg != nil {
+       print("PC=", hex(c.sigpc()), " m=", mp.id, " sigcode=", c.sigcode(), "\n")
+       if mp.incgo && gp == mp.g0 && mp.curg != nil {
                print("signal arrived during cgo execution\n")
                // Switch to curg so that we get a traceback of the Go code
                // leading up to the cgocall, which switched from curg to g0.
-               gp = _g_.m.curg
+               gp = mp.curg
        }
        if sig == _SIGILL || sig == _SIGFPE {
                // It would be nice to know how long the instruction is.
@@ -760,10 +762,10 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
        if level > 0 {
                goroutineheader(gp)
                tracebacktrap(c.sigpc(), c.sigsp(), c.siglr(), gp)
-               if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
+               if crashing > 0 && gp != mp.curg && mp.curg != nil && readgstatus(mp.curg)&^_Gscan == _Grunning {
                        // tracebackothers on original m skipped this one; trace it now.
-                       goroutineheader(_g_.m.curg)
-                       traceback(^uintptr(0), ^uintptr(0), 0, _g_.m.curg)
+                       goroutineheader(mp.curg)
+                       traceback(^uintptr(0), ^uintptr(0), 0, mp.curg)
                } else if crashing == 0 {
                        tracebackothers(gp)
                        print("\n")
@@ -814,34 +816,34 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
 //
 //go:linkname sigpanic
 func sigpanic() {
-       g := getg()
-       if !canpanic(g) {
+       gp := getg()
+       if !canpanic() {
                throw("unexpected signal during runtime execution")
        }
 
-       switch g.sig {
+       switch gp.sig {
        case _SIGBUS:
-               if g.sigcode0 == _BUS_ADRERR && g.sigcode1 < 0x1000 {
+               if gp.sigcode0 == _BUS_ADRERR && gp.sigcode1 < 0x1000 {
                        panicmem()
                }
                // Support runtime/debug.SetPanicOnFault.
-               if g.paniconfault {
-                       panicmemAddr(g.sigcode1)
+               if gp.paniconfault {
+                       panicmemAddr(gp.sigcode1)
                }
-               print("unexpected fault address ", hex(g.sigcode1), "\n")
+               print("unexpected fault address ", hex(gp.sigcode1), "\n")
                throw("fault")
        case _SIGSEGV:
-               if (g.sigcode0 == 0 || g.sigcode0 == _SEGV_MAPERR || g.sigcode0 == _SEGV_ACCERR) && g.sigcode1 < 0x1000 {
+               if (gp.sigcode0 == 0 || gp.sigcode0 == _SEGV_MAPERR || gp.sigcode0 == _SEGV_ACCERR) && gp.sigcode1 < 0x1000 {
                        panicmem()
                }
                // Support runtime/debug.SetPanicOnFault.
-               if g.paniconfault {
-                       panicmemAddr(g.sigcode1)
+               if gp.paniconfault {
+                       panicmemAddr(gp.sigcode1)
                }
-               print("unexpected fault address ", hex(g.sigcode1), "\n")
+               print("unexpected fault address ", hex(gp.sigcode1), "\n")
                throw("fault")
        case _SIGFPE:
-               switch g.sigcode0 {
+               switch gp.sigcode0 {
                case _FPE_INTDIV:
                        panicdivide()
                case _FPE_INTOVF:
@@ -850,11 +852,11 @@ func sigpanic() {
                panicfloat()
        }
 
-       if g.sig >= uint32(len(sigtable)) {
-               // can't happen: we looked up g.sig in sigtable to decide to call sigpanic
+       if gp.sig >= uint32(len(sigtable)) {
+               // can't happen: we looked up gp.sig in sigtable to decide to call sigpanic
                throw("unexpected signal value")
        }
-       panic(errorString(sigtable[g.sig].name))
+       panic(errorString(sigtable[gp.sig].name))
 }
 
 // dieFromSignal kills the program with a signal.
@@ -1115,8 +1117,8 @@ func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool {
        //   (1) we weren't in VDSO page,
        //   (2) we were in a goroutine (i.e., m.curg != nil), and
        //   (3) we weren't in CGO.
-       g := sigFetchG(c)
-       if g != nil && g.m != nil && g.m.curg != nil && !g.m.incgo {
+       gp := sigFetchG(c)
+       if gp != nil && gp.m != nil && gp.m.curg != nil && !gp.m.incgo {
                return false
        }
 
@@ -1207,15 +1209,15 @@ func minitSignals() {
 // of whether it is already set). Record which choice was made in
 // newSigstack, so that it can be undone in unminit.
 func minitSignalStack() {
-       _g_ := getg()
+       mp := getg().m
        var st stackt
        sigaltstack(nil, &st)
        if st.ss_flags&_SS_DISABLE != 0 || !iscgo {
-               signalstack(&_g_.m.gsignal.stack)
-               _g_.m.newSigstack = true
+               signalstack(&mp.gsignal.stack)
+               mp.newSigstack = true
        } else {
-               setGsignalStack(&st, &_g_.m.goSigStack)
-               _g_.m.newSigstack = false
+               setGsignalStack(&st, &mp.goSigStack)
+               mp.newSigstack = false
        }
 }
 
@@ -1297,18 +1299,18 @@ type gsignalStack struct {
 //go:nosplit
 //go:nowritebarrierrec
 func setGsignalStack(st *stackt, old *gsignalStack) {
-       g := getg()
+       gp := getg()
        if old != nil {
-               old.stack = g.m.gsignal.stack
-               old.stackguard0 = g.m.gsignal.stackguard0
-               old.stackguard1 = g.m.gsignal.stackguard1
-               old.stktopsp = g.m.gsignal.stktopsp
+               old.stack = gp.m.gsignal.stack
+               old.stackguard0 = gp.m.gsignal.stackguard0
+               old.stackguard1 = gp.m.gsignal.stackguard1
+               old.stktopsp = gp.m.gsignal.stktopsp
        }
        stsp := uintptr(unsafe.Pointer(st.ss_sp))
-       g.m.gsignal.stack.lo = stsp
-       g.m.gsignal.stack.hi = stsp + st.ss_size
-       g.m.gsignal.stackguard0 = stsp + _StackGuard
-       g.m.gsignal.stackguard1 = stsp + _StackGuard
+       gp.m.gsignal.stack.lo = stsp
+       gp.m.gsignal.stack.hi = stsp + st.ss_size
+       gp.m.gsignal.stackguard0 = stsp + _StackGuard
+       gp.m.gsignal.stackguard1 = stsp + _StackGuard
 }
 
 // restoreGsignalStack restores the gsignal stack to the value it had
@@ -1340,9 +1342,9 @@ func signalstack(s *stack) {
 //go:nosplit
 //go:linkname setsigsegv
 func setsigsegv(pc uintptr) {
-       g := getg()
-       g.sig = _SIGSEGV
-       g.sigpc = pc
-       g.sigcode0 = _SEGV_MAPERR
-       g.sigcode1 = 0 // TODO: emulate si_addr
+       gp := getg()
+       gp.sig = _SIGSEGV
+       gp.sigpc = pc
+       gp.sigcode0 = _SEGV_MAPERR
+       gp.sigcode1 = 0 // TODO: emulate si_addr
 }
index c5cf38c5c2b7db206ff45fe09a0d928eb87ff4a7..4a0287dcfdef6c6998be484a226d7e620307cbe0 100644 (file)
@@ -199,9 +199,10 @@ func lastcontinuehandler(info *exceptionrecord, r *context, gp *g) int32 {
        return 0 // not reached
 }
 
+// Always called on g0. gp is the G where the exception occurred.
 //go:nosplit
 func winthrow(info *exceptionrecord, r *context, gp *g) {
-       _g_ := getg()
+       g0 := getg()
 
        if panicking != 0 { // traceback already printed
                exit(2)
@@ -211,23 +212,23 @@ func winthrow(info *exceptionrecord, r *context, gp *g) {
        // In case we're handling a g0 stack overflow, blow away the
        // g0 stack bounds so we have room to print the traceback. If
        // this somehow overflows the stack, the OS will trap it.
-       _g_.stack.lo = 0
-       _g_.stackguard0 = _g_.stack.lo + _StackGuard
-       _g_.stackguard1 = _g_.stackguard0
+       g0.stack.lo = 0
+       g0.stackguard0 = g0.stack.lo + _StackGuard
+       g0.stackguard1 = g0.stackguard0
 
        print("Exception ", hex(info.exceptioncode), " ", hex(info.exceptioninformation[0]), " ", hex(info.exceptioninformation[1]), " ", hex(r.ip()), "\n")
 
        print("PC=", hex(r.ip()), "\n")
-       if _g_.m.incgo && gp == _g_.m.g0 && _g_.m.curg != nil {
+       if g0.m.incgo && gp == g0.m.g0 && g0.m.curg != nil {
                if iscgo {
                        print("signal arrived during external code execution\n")
                }
-               gp = _g_.m.curg
+               gp = g0.m.curg
        }
        print("\n")
 
-       _g_.m.throwing = throwTypeRuntime
-       _g_.m.caughtsig.set(gp)
+       g0.m.throwing = throwTypeRuntime
+       g0.m.caughtsig.set(gp)
 
        level, _, docrash := gotraceback()
        if level > 0 {
@@ -244,20 +245,20 @@ func winthrow(info *exceptionrecord, r *context, gp *g) {
 }
 
 func sigpanic() {
-       g := getg()
-       if !canpanic(g) {
+       gp := getg()
+       if !canpanic() {
                throw("unexpected signal during runtime execution")
        }
 
-       switch g.sig {
+       switch gp.sig {
        case _EXCEPTION_ACCESS_VIOLATION:
-               if g.sigcode1 < 0x1000 {
+               if gp.sigcode1 < 0x1000 {
                        panicmem()
                }
-               if g.paniconfault {
-                       panicmemAddr(g.sigcode1)
+               if gp.paniconfault {
+                       panicmemAddr(gp.sigcode1)
                }
-               print("unexpected fault address ", hex(g.sigcode1), "\n")
+               print("unexpected fault address ", hex(gp.sigcode1), "\n")
                throw("fault")
        case _EXCEPTION_INT_DIVIDE_BY_ZERO:
                panicdivide()
index d2a300d8f2004c9e6f6a2f7f66777664f32863a7..b18bc74a064e23de9d380c7bb90d778c991be79e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Invoke signal hander in the VDSO context (see issue 32912).
+// Invoke signal handler in the VDSO context (see issue 32912).
 
 package main
 
index 10436d80c2f54b27f6f7594af5ba68cde26149ca..9b12b42f1170243471b3c19f83383d58c94dcdbf 100644 (file)
@@ -232,14 +232,12 @@ func StartTrace() error {
        // - or GoSysExit appears for a goroutine for which we don't emit EvGoInSyscall below.
        // To instruct traceEvent that it must not ignore events below, we set startingtrace.
        // trace.enabled is set afterwards once we have emitted all preliminary events.
-       _g_ := getg()
-       _g_.m.startingtrace = true
+       mp := getg().m
+       mp.startingtrace = true
 
        // Obtain current stack ID to use in all traceEvGoCreate events below.
-       mp := acquirem()
        stkBuf := make([]uintptr, traceStackSize)
        stackID := traceStackID(mp, stkBuf, 2)
-       releasem(mp)
 
        profBuf := newProfBuf(2, profBufWordCount, profBufTagCount) // after the timestamp, header is [pp.id, gp.goid]
        trace.cpuLogRead = profBuf
@@ -293,7 +291,7 @@ func StartTrace() error {
        trace.strings = make(map[string]uint64)
 
        trace.seqGC = 0
-       _g_.m.startingtrace = false
+       mp.startingtrace = false
        trace.enabled = true
 
        // Register runtime goroutine labels.
@@ -782,19 +780,18 @@ func traceReadCPU() {
 }
 
 func traceStackID(mp *m, buf []uintptr, skip int) uint64 {
-       _g_ := getg()
-       gp := mp.curg
+       gp := getg()
+       curgp := mp.curg
        var nstk int
-       if gp == _g_ {
+       if curgp == gp {
                nstk = callers(skip+1, buf)
-       } else if gp != nil {
-               gp = mp.curg
-               nstk = gcallers(gp, skip, buf)
+       } else if curgp != nil {
+               nstk = gcallers(curgp, skip, buf)
        }
        if nstk > 0 {
                nstk-- // skip runtime.goexit
        }
-       if nstk > 0 && gp.goid == 1 {
+       if nstk > 0 && curgp.goid == 1 {
                nstk-- // skip runtime.main
        }
        id := trace.stackTab.put(buf[:nstk])
@@ -1208,11 +1205,11 @@ func traceGCSTWDone() {
 func traceGCSweepStart() {
        // Delay the actual GCSweepStart event until the first span
        // sweep. If we don't sweep anything, don't emit any events.
-       _p_ := getg().m.p.ptr()
-       if _p_.traceSweep {
+       pp := getg().m.p.ptr()
+       if pp.traceSweep {
                throw("double traceGCSweepStart")
        }
-       _p_.traceSweep, _p_.traceSwept, _p_.traceReclaimed = true, 0, 0
+       pp.traceSweep, pp.traceSwept, pp.traceReclaimed = true, 0, 0
 }
 
 // traceGCSweepSpan traces the sweep of a single page.
@@ -1220,24 +1217,24 @@ func traceGCSweepStart() {
 // This may be called outside a traceGCSweepStart/traceGCSweepDone
 // pair; however, it will not emit any trace events in this case.
 func traceGCSweepSpan(bytesSwept uintptr) {
-       _p_ := getg().m.p.ptr()
-       if _p_.traceSweep {
-               if _p_.traceSwept == 0 {
+       pp := getg().m.p.ptr()
+       if pp.traceSweep {
+               if pp.traceSwept == 0 {
                        traceEvent(traceEvGCSweepStart, 1)
                }
-               _p_.traceSwept += bytesSwept
+               pp.traceSwept += bytesSwept
        }
 }
 
 func traceGCSweepDone() {
-       _p_ := getg().m.p.ptr()
-       if !_p_.traceSweep {
+       pp := getg().m.p.ptr()
+       if !pp.traceSweep {
                throw("missing traceGCSweepStart")
        }
-       if _p_.traceSwept != 0 {
-               traceEvent(traceEvGCSweepDone, -1, uint64(_p_.traceSwept), uint64(_p_.traceReclaimed))
+       if pp.traceSwept != 0 {
+               traceEvent(traceEvGCSweepDone, -1, uint64(pp.traceSwept), uint64(pp.traceReclaimed))
        }
-       _p_.traceSweep = false
+       pp.traceSweep = false
 }
 
 func traceGCMarkAssistStart() {
@@ -1257,16 +1254,16 @@ func traceGoCreate(newg *g, pc uintptr) {
 }
 
 func traceGoStart() {
-       _g_ := getg().m.curg
-       _p_ := _g_.m.p
-       _g_.traceseq++
-       if _p_.ptr().gcMarkWorkerMode != gcMarkWorkerNotWorker {
-               traceEvent(traceEvGoStartLabel, -1, uint64(_g_.goid), _g_.traceseq, trace.markWorkerLabels[_p_.ptr().gcMarkWorkerMode])
-       } else if _g_.tracelastp == _p_ {
-               traceEvent(traceEvGoStartLocal, -1, uint64(_g_.goid))
+       gp := getg().m.curg
+       pp := gp.m.p
+       gp.traceseq++
+       if pp.ptr().gcMarkWorkerMode != gcMarkWorkerNotWorker {
+               traceEvent(traceEvGoStartLabel, -1, uint64(gp.goid), gp.traceseq, trace.markWorkerLabels[pp.ptr().gcMarkWorkerMode])
+       } else if gp.tracelastp == pp {
+               traceEvent(traceEvGoStartLocal, -1, uint64(gp.goid))
        } else {
-               _g_.tracelastp = _p_
-               traceEvent(traceEvGoStart, -1, uint64(_g_.goid), _g_.traceseq)
+               gp.tracelastp = pp
+               traceEvent(traceEvGoStart, -1, uint64(gp.goid), gp.traceseq)
        }
 }
 
@@ -1275,14 +1272,14 @@ func traceGoEnd() {
 }
 
 func traceGoSched() {
-       _g_ := getg()
-       _g_.tracelastp = _g_.m.p
+       gp := getg()
+       gp.tracelastp = gp.m.p
        traceEvent(traceEvGoSched, 1)
 }
 
 func traceGoPreempt() {
-       _g_ := getg()
-       _g_.tracelastp = _g_.m.p
+       gp := getg()
+       gp.tracelastp = gp.m.p
        traceEvent(traceEvGoPreempt, 1)
 }
 
@@ -1294,12 +1291,12 @@ func traceGoPark(traceEv byte, skip int) {
 }
 
 func traceGoUnpark(gp *g, skip int) {
-       _p_ := getg().m.p
+       pp := getg().m.p
        gp.traceseq++
-       if gp.tracelastp == _p_ {
+       if gp.tracelastp == pp {
                traceEvent(traceEvGoUnblockLocal, skip, uint64(gp.goid))
        } else {
-               gp.tracelastp = _p_
+               gp.tracelastp = pp
                traceEvent(traceEvGoUnblock, skip, uint64(gp.goid), gp.traceseq)
        }
 }
@@ -1321,10 +1318,10 @@ func traceGoSysExit(ts int64) {
                // aka right now), and assign a fresh time stamp to keep the log consistent.
                ts = 0
        }
-       _g_ := getg().m.curg
-       _g_.traceseq++
-       _g_.tracelastp = _g_.m.p
-       traceEvent(traceEvGoSysExit, -1, uint64(_g_.goid), _g_.traceseq, uint64(ts)/traceTickDiv)
+       gp := getg().m.curg
+       gp.traceseq++
+       gp.tracelastp = gp.m.p
+       traceEvent(traceEvGoSysExit, -1, uint64(gp.goid), gp.traceseq, uint64(ts)/traceTickDiv)
 }
 
 func traceGoSysBlock(pp *p) {
index 49147ff8381e3b45cea2f51cfc9792a3b90fcd08..6df0bbfabebac068290e0e4898e612405bb8fcb9 100644 (file)
@@ -923,8 +923,8 @@ func gcallers(gp *g, skip int, pcbuf []uintptr) int {
 // showframe reports whether the frame with the given characteristics should
 // be printed during a traceback.
 func showframe(f funcInfo, gp *g, firstFrame bool, funcID, childID funcID) bool {
-       g := getg()
-       if g.m.throwing >= throwTypeRuntime && gp != nil && (gp == g.m.curg || gp == g.m.caughtsig.ptr()) {
+       mp := getg().m
+       if mp.throwing >= throwTypeRuntime && gp != nil && (gp == mp.curg || gp == mp.caughtsig.ptr()) {
                return true
        }
        return showfuncinfo(f, firstFrame, funcID, childID)
@@ -1051,10 +1051,10 @@ func tracebackothers(me *g) {
                }
                print("\n")
                goroutineheader(gp)
-               // Note: gp.m == g.m occurs when tracebackothers is
-               // called from a signal handler initiated during a
-               // systemstack call. The original G is still in the
-               // running state, and we want to print its stack.
+               // Note: gp.m == getg().m occurs when tracebackothers is called
+               // from a signal handler initiated during a systemstack call.
+               // The original G is still in the running state, and we want to
+               // print its stack.
                if gp.m != getg().m && readgstatus(gp)&^_Gscan == _Grunning {
                        print("\tgoroutine running on other thread; stack unavailable\n")
                        printcreatedby(gp)
index 443182b42ebfd83f18bb53189f604743a05a1b02..d0b2102013876cdd935d11867f7dd7a8fbbd4467 100644 (file)
@@ -4,7 +4,10 @@
 
 package sort
 
-import "math/bits"
+import (
+       "internal/reflectlite"
+       "math/bits"
+)
 
 // Slice sorts the slice x given the provided less function.
 // It panics if x is not a slice.
@@ -16,8 +19,8 @@ import "math/bits"
 // The less function must satisfy the same requirements as
 // the Interface type's Less method.
 func Slice(x any, less func(i, j int) bool) {
-       rv := reflectValueOf(x)
-       swap := reflectSwapper(x)
+       rv := reflectlite.ValueOf(x)
+       swap := reflectlite.Swapper(x)
        length := rv.Len()
        limit := bits.Len(uint(length))
        pdqsort_func(lessSwap{less, swap}, 0, length, limit)
@@ -30,15 +33,15 @@ func Slice(x any, less func(i, j int) bool) {
 // The less function must satisfy the same requirements as
 // the Interface type's Less method.
 func SliceStable(x any, less func(i, j int) bool) {
-       rv := reflectValueOf(x)
-       swap := reflectSwapper(x)
+       rv := reflectlite.ValueOf(x)
+       swap := reflectlite.Swapper(x)
        stable_func(lessSwap{less, swap}, rv.Len())
 }
 
 // SliceIsSorted reports whether the slice x is sorted according to the provided less function.
 // It panics if x is not a slice.
 func SliceIsSorted(x any, less func(i, j int) bool) bool {
-       rv := reflectValueOf(x)
+       rv := reflectlite.ValueOf(x)
        n := rv.Len()
        for i := n - 1; i > 0; i-- {
                if less(i, i-1) {
diff --git a/src/sort/slice_go113.go b/src/sort/slice_go113.go
deleted file mode 100644 (file)
index 53542db..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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.
-
-//go:build go1.13
-// +build go1.13
-
-package sort
-
-import "internal/reflectlite"
-
-var reflectValueOf = reflectlite.ValueOf
-var reflectSwapper = reflectlite.Swapper
diff --git a/src/sort/slice_go14.go b/src/sort/slice_go14.go
deleted file mode 100644 (file)
index e477367..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 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.
-
-//go:build !go1.8
-// +build !go1.8
-
-package sort
-
-import "reflect"
-
-var reflectValueOf = reflect.ValueOf
-
-func reflectSwapper(x any) func(int, int) {
-       v := reflectValueOf(x)
-       tmp := reflect.New(v.Type().Elem()).Elem()
-       return func(i, j int) {
-               a, b := v.Index(i), v.Index(j)
-               tmp.Set(a)
-               a.Set(b)
-               b.Set(tmp)
-       }
-}
diff --git a/src/sort/slice_go18.go b/src/sort/slice_go18.go
deleted file mode 100644 (file)
index 1538477..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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.
-
-//go:build go1.8 && !go1.13
-// +build go1.8,!go1.13
-
-package sort
-
-import "reflect"
-
-var reflectValueOf = reflect.ValueOf
-var reflectSwapper = reflect.Swapper
index 0444b6426625b8477c522b95854088e0f45b8606..ff128b1a19fc03bbeb668a55fed008b70f4aa5b6 100644 (file)
@@ -516,6 +516,9 @@ func TestSetuidEtc(t *testing.T) {
        if syscall.Getuid() != 0 {
                t.Skip("skipping root only test")
        }
+       if _, err := os.Stat("/etc/alpine-release"); err == nil {
+               t.Skip("skipping glibc test on alpine - go.dev/issue/19938")
+       }
        vs := []struct {
                call           string
                fn             func() error
diff --git a/src/vendor/golang.org/x/crypto/AUTHORS b/src/vendor/golang.org/x/crypto/AUTHORS
deleted file mode 100644 (file)
index 2b00ddb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/src/vendor/golang.org/x/crypto/CONTRIBUTORS b/src/vendor/golang.org/x/crypto/CONTRIBUTORS
deleted file mode 100644 (file)
index 1fbd3e9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
index cda3fdd3540dd0363d6e2d1e85a3ad161fb0078f..bc62161d6e42586f623d3c942b9958d6454ff64b 100644 (file)
@@ -9,7 +9,8 @@ package curve25519 // import "golang.org/x/crypto/curve25519"
 
 import (
        "crypto/subtle"
-       "fmt"
+       "errors"
+       "strconv"
 
        "golang.org/x/crypto/curve25519/internal/field"
 )
@@ -124,10 +125,10 @@ func X25519(scalar, point []byte) ([]byte, error) {
 func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
        var in [32]byte
        if l := len(scalar); l != 32 {
-               return nil, fmt.Errorf("bad scalar length: %d, expected %d", l, 32)
+               return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32")
        }
        if l := len(point); l != 32 {
-               return nil, fmt.Errorf("bad point length: %d, expected %d", l, 32)
+               return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32")
        }
        copy(in[:], scalar)
        if &point[0] == &Basepoint[0] {
@@ -138,7 +139,7 @@ func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
                copy(base[:], point)
                ScalarMult(dst, &in, &base)
                if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
-                       return nil, fmt.Errorf("bad input point: low order point")
+                       return nil, errors.New("bad input point: low order point")
                }
        }
        return dst[:], nil
diff --git a/src/vendor/golang.org/x/sys/AUTHORS b/src/vendor/golang.org/x/sys/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/vendor/golang.org/x/sys/CONTRIBUTORS b/src/vendor/golang.org/x/sys/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go b/src/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
new file mode 100644 (file)
index 0000000..dd10eb7
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2022 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.
+
+//go:build !linux && riscv64
+// +build !linux,riscv64
+
+package cpu
+
+func archInit() {
+       Initialized = true
+}
diff --git a/src/vendor/golang.org/x/text/AUTHORS b/src/vendor/golang.org/x/text/AUTHORS
deleted file mode 100644 (file)
index 15167cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/src/vendor/golang.org/x/text/CONTRIBUTORS b/src/vendor/golang.org/x/text/CONTRIBUTORS
deleted file mode 100644 (file)
index 1c4577e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
index dfb87abf137cca90d9a2c46a4308c73f616ae65b..a07f830a48bc9f1051032abc45deaa301a63793d 100644 (file)
@@ -1,4 +1,4 @@
-# golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8
+# golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
 ## explicit; go 1.17
 golang.org/x/crypto/chacha20
 golang.org/x/crypto/chacha20poly1305
@@ -19,10 +19,10 @@ golang.org/x/net/idna
 golang.org/x/net/lif
 golang.org/x/net/nettest
 golang.org/x/net/route
-# golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098
+# golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704
 ## explicit; go 1.17
 golang.org/x/sys/cpu
-# golang.org/x/text v0.3.8-0.20220509174342-b4bca84b0361
+# golang.org/x/text v0.3.8-0.20220722155301-d03b41800055
 ## explicit; go 1.17
 golang.org/x/text/secure/bidirule
 golang.org/x/text/transform
diff --git a/test/typeparam/issue54135.go b/test/typeparam/issue54135.go
new file mode 100644 (file)
index 0000000..b489a51
--- /dev/null
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2022 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.
+
+package main
+
+type Foo struct{}
+
+func (Foo) Blanker() {}
+
+type Bar[T any] interface {
+       Blanker()
+}
+
+type Baz interface {
+       Some()
+}
+
+func check[T comparable](p Bar[T]) {
+       if x, ok := p.(any); !ok || x != p {
+               panic("FAIL")
+       }
+       if _, ok := p.(Baz); ok {
+               panic("FAIL")
+       }
+}
+
+func main() {
+       check[int](Foo{})
+}