Put random() state behind mutex
This puts the state of random()
and related functions behind a mutex, similar to the musl implementation.
Raw pointers (in this case x_ptr
) are not Send
in Rust, so I had to manually implement Send
for the state struct. There should otherwise be no particularly dirty hacks.
Marking as draft for now due to a mysterious Should be fixed after a rebase past !494 (merged). forkpty
error in tests.However, this also includes some formatting issues originating in !492 (merged). Formatting now fixed.
Edited by Peter Limkilde Svendsen