Alexander Motin 3a57f08b50 Fix race between first rand(3) calls with _once().
Before this patch there was a chance for thread that called rand(3)
slightly later to see rand3_state already allocated, but not yet
initialized.  While this API is not expected to be thread-safe, it
is not expected to crash.  ztest on 64-thread system reproduced it
reliably for me.

Submitted by:	avg@
MFC after:	1 month
2021-07-21 11:32:22 -04:00
..
2018-05-29 02:41:32 +00:00
2018-06-13 08:52:17 +00:00
2019-07-17 19:29:55 +00:00
2020-10-16 17:51:09 +00:00
2020-04-10 09:27:18 +00:00
2020-10-17 04:14:38 +00:00
2020-10-17 04:14:38 +00:00
2019-12-04 16:56:11 +00:00
2020-02-20 16:58:19 +00:00