aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-05-21 23:24:47 -0400
committerGopher Robot <gobot@golang.org>2024-05-23 00:18:55 +0000
commitbde905af5b11e3e34bc1f5d4846d7767f7197236 (patch)
tree8def6eab2e681e1b463e8327279bc8f833b5f10f /src/runtime/proc.go
parent2f07d4455636ece45ff843fe4d9298ea65f933c1 (diff)
downloadgo-bde905af5b11e3e34bc1f5d4846d7767f7197236.tar.xz
all: document legacy //go:linkname for modules with ≥20,000 dependents
For #67401. Change-Id: Icc10ede72547d8020c0ba45e89d954822a4b2455 Reviewed-on: https://go-review.googlesource.com/c/go/+/587218 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 12f26fbb6c..ba44f05c16 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -4731,6 +4731,14 @@ func exitsyscall0(gp *g) {
// Called from syscall package before fork.
//
+// syscall_runtime_BeforeFork is for package syscall,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+// - github.com/containerd/containerd
+//
+// Do not remove or change the type signature.
+// See go.dev/issue/67401.
+//
//go:linkname syscall_runtime_BeforeFork syscall.runtime_BeforeFork
//go:nosplit
func syscall_runtime_BeforeFork() {
@@ -4752,6 +4760,14 @@ func syscall_runtime_BeforeFork() {
// Called from syscall package after fork in parent.
//
+// syscall_runtime_AfterFork is for package syscall,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+// - github.com/containerd/containerd
+//
+// Do not remove or change the type signature.
+// See go.dev/issue/67401.
+//
//go:linkname syscall_runtime_AfterFork syscall.runtime_AfterFork
//go:nosplit
func syscall_runtime_AfterFork() {
@@ -4777,6 +4793,14 @@ var inForkedChild bool
// temporarily sharing address space with the parent process, this must
// not change any global variables or calling into C code that may do so.
//
+// syscall_runtime_AfterForkInChild is for package syscall,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+// - github.com/containerd/containerd
+//
+// Do not remove or change the type signature.
+// See go.dev/issue/67401.
+//
//go:linkname syscall_runtime_AfterForkInChild syscall.runtime_AfterForkInChild
//go:nosplit
//go:nowritebarrierrec