aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/alg.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-05-22 15:46:02 -0400
committerGopher Robot <gobot@golang.org>2024-05-23 01:17:26 +0000
commit4cac885741b845bd7f4aaad5bc9844b44eb23136 (patch)
treeed100e299cb58e1783aaf80f18b2375555d024d2 /src/runtime/alg.go
parent05cbbf985fed823a174bf95cc78a7d44f948fdab (diff)
downloadgo-4cac885741b845bd7f4aaad5bc9844b44eb23136.tar.xz
all: document legacy //go:linkname for modules with ≥200 dependents
Ignored these linknames which have not worked for a while: github.com/xtls/xray-core: context.newCancelCtx removed in CL 463999 (Feb 2023) github.com/u-root/u-root: funcPC removed in CL 513837 (Jul 2023) tinygo.org/x/drivers: net.useNetdev never existed For #67401. Change-Id: I9293f4ef197bb5552b431de8939fa94988a060ce Reviewed-on: https://go-review.googlesource.com/c/go/+/587576 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/alg.go')
-rw-r--r--src/runtime/alg.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go
index f40cc9b8b6..c11ef4c6ef 100644
--- a/src/runtime/alg.go
+++ b/src/runtime/alg.go
@@ -49,8 +49,12 @@ var useAeshash bool
// memhash should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
+// - github.com/aacfactory/fns
// - github.com/dgraph-io/ristretto
+// - github.com/nbd-wtf/go-nostr
// - github.com/outcaste-io/ristretto
+// - github.com/puzpuzpuz/xsync/v2
+// - github.com/puzpuzpuz/xsync/v3
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
@@ -67,6 +71,7 @@ func memhash64(p unsafe.Pointer, h uintptr) uintptr
// - github.com/aristanetworks/goarista
// - github.com/bytedance/sonic
// - github.com/bytedance/go-tagexpr/v2
+// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
@@ -176,6 +181,17 @@ func nilinterhash(p unsafe.Pointer, h uintptr) uintptr {
// maps generated by reflect.MapOf (reflect_typehash, below).
// Note: this function must match the compiler generated
// functions exactly. See issue 37716.
+//
+// typehash should be an internal detail,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+// - github.com/puzpuzpuz/xsync/v2
+// - github.com/puzpuzpuz/xsync/v3
+//
+// Do not remove or change the type signature.
+// See go.dev/issue/67401.
+//
+//go:linkname typehash
func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr {
if t.TFlag&abi.TFlagRegularMemory != 0 {
// Handle ptr sizes specially, see issue 37086.