diff options
| author | Russ Cox <rsc@golang.org> | 2024-05-21 23:39:35 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-05-23 00:18:59 +0000 |
| commit | 5fc5555feb059baaf6d3c2f0a9229b3a020716a9 (patch) | |
| tree | aafdd07175d3326bdc61d1189d9c51a67d2e88f9 /src/runtime/alg.go | |
| parent | bde905af5b11e3e34bc1f5d4846d7767f7197236 (diff) | |
| download | go-5fc5555feb059baaf6d3c2f0a9229b3a020716a9.tar.xz | |
all: document legacy //go:linkname for modules with ≥10,000 dependents
For #67401.
Change-Id: I9216f01ac4dc9d239f3f20a633fd0d5072cf0a0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/587219
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/alg.go')
| -rw-r--r-- | src/runtime/alg.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go index 42b332d244..9469681572 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -45,7 +45,18 @@ func memhash_varlen(p unsafe.Pointer, h uintptr) uintptr { var useAeshash bool // in asm_*.s + +// memhash should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/dgraph-io/ristretto +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname memhash func memhash(p unsafe.Pointer, h, s uintptr) uintptr + func memhash32(p unsafe.Pointer, h uintptr) uintptr func memhash64(p unsafe.Pointer, h uintptr) uintptr |
