]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/compiler-rt/lib/gwp_asan/random.h
Update nvi to 2.2.0-05ed8b9
[FreeBSD/FreeBSD.git] / contrib / llvm-project / compiler-rt / lib / gwp_asan / random.h
1 //===-- random.h ------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef GWP_ASAN_RANDOM_H_
10 #define GWP_ASAN_RANDOM_H_
11
12 #include <stdint.h>
13
14 namespace gwp_asan {
15 // Initialise the PRNG, using time and thread ID as the seed.
16 void initPRNG();
17
18 // xorshift (32-bit output), extremely fast PRNG that uses arithmetic operations
19 // only. Seeded using walltime.
20 uint32_t getRandomUnsigned32();
21 } // namespace gwp_asan
22
23 #endif // GWP_ASAN_RANDOM_H_