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
14namespace gwp_asan {
15// Initialise the PRNG, using time and thread ID as the seed.
16void initPRNG();
17
18// xorshift (32-bit output), extremely fast PRNG that uses arithmetic operations
19// only. Seeded using walltime.
20uint32_t getRandomUnsigned32();
21} // namespace gwp_asan
22
23#endif // GWP_ASAN_RANDOM_H_
24