]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: put runtime.fastrand back temporarily
authorRuss Cox <rsc@golang.org>
Thu, 7 Dec 2023 16:11:01 +0000 (11:11 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 7 Dec 2023 23:44:31 +0000 (23:44 +0000)
commitdca2ef236151e5606a5863d82f1a10289ce77105
tree37d6803a1c641db3fbae08c32b36cac02896fba6
parente1c0349a7c607cdfcfa8f7c0c6b70aceff9d3752
runtime: put runtime.fastrand back temporarily

Callers should be using math/rand/v2.Uint64 instead,
but there are lots of linkname references to runtime.fastrand
in public code. If we break it all now, that will require people
to use //go:build tags to use rand/v2.Uint64 with Go 1.22
and keep using the linkname for earlier versions.
Instead, leave the linkname working and then we can remove
it in Go 1.24, at which point everyone should be able to use
math/rand/v2.Uint64 unconditionally.

Change-Id: I7287ca4f67c270b009562313661cc28a4c2219a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/548235
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/runtime/rand.go
src/runtime/rand_test.go