aboutsummaryrefslogtreecommitdiff
path: root/src/sync/pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/sync/pool.go')
-rw-r--r--src/sync/pool.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sync/pool.go b/src/sync/pool.go
index ffab67bf19..3359aba57b 100644
--- a/src/sync/pool.go
+++ b/src/sync/pool.go
@@ -76,7 +76,8 @@ type poolLocal struct {
}
// from runtime
-func fastrandn(n uint32) uint32
+//go:linkname runtime_randn runtime.randn
+func runtime_randn(n uint32) uint32
var poolRaceHash [128]uint64
@@ -97,7 +98,7 @@ func (p *Pool) Put(x any) {
return
}
if race.Enabled {
- if fastrandn(4) == 0 {
+ if runtime_randn(4) == 0 {
// Randomly drop x on floor.
return
}