github.com/haraldrudell/parl@v0.4.176/prand/fastrand-link.go (about) 1 /* 2 © 2023–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package prand 7 8 import _ "unsafe" 9 10 // On Linux x86_64, this is aesrand seeded by /dev/urandom 11 // - thread-safe because shared state is per-goroutine 12 // - https://go.googlesource.com/go/+/refs/heads/master/src/runtime/stubs.go#124 13 // 14 //go:linkname fastrand runtime.fastrand 15 func fastrand() uint32 16 17 //go:linkname fastrandn runtime.fastrandn 18 func fastrandn(uint32) uint32