diff options
Diffstat (limited to 'libc/src/stdlib/srand.cpp')
| -rw-r--r-- | libc/src/stdlib/srand.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/src/stdlib/srand.cpp b/libc/src/stdlib/srand.cpp index 008c7a9e565e..21166c7a6754 100644 --- a/libc/src/stdlib/srand.cpp +++ b/libc/src/stdlib/srand.cpp @@ -12,6 +12,8 @@ namespace LIBC_NAMESPACE { -LLVM_LIBC_FUNCTION(void, srand, (unsigned int seed)) { rand_next = seed; } +LLVM_LIBC_FUNCTION(void, srand, (unsigned int seed)) { + rand_next.store(seed, cpp::MemoryOrder::RELAXED); +} } // namespace LIBC_NAMESPACE |
