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
..
2021-04-09 23:46:24 +03:00
2020-10-09 19:12:44 +00:00
2020-04-30 22:08:40 +00:00
2021-05-13 16:23:44 +02:00
2018-10-20 22:39:35 +00:00
2021-04-09 23:46:24 +03:00
2020-04-30 22:08:40 +00:00
2021-02-23 20:08:10 +02:00
2021-04-09 23:46:24 +03:00
2020-12-16 09:02:09 +00:00
2021-05-13 09:53:08 +02:00
2020-04-30 22:08:40 +00:00
2021-07-15 22:41:10 -04:00
2019-12-11 17:37:53 +00:00