runtime: add calls to initRand() during run() for all schedulers.

Intended to ensure that the random number seed used is always initialized on startup.

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2025-12-18 12:56:20 +01:00
committed by Ron Evans
parent 897f2bc5fd
commit 0e540dc3da
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -136,6 +136,7 @@ func sleep(duration int64) {
// other cores when ready.
func run() {
initHeap()
initRand()
go func() {
// Package initializers are currently run single-threaded.
+1
View File
@@ -22,6 +22,7 @@ var (
// can just initialize everything and run main.main on the main thread.
func run() {
initHeap()
initRand()
task.Init(stackTop)
initAll()
callMain()