From 3db72104ad5664ed320253a342e1b26ad2f7da28 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 13 May 2019 11:57:45 +0200 Subject: new example + moved random number generator to common files --- test/monniaux/dm_random.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/monniaux/dm_random.c (limited to 'test/monniaux/dm_random.c') diff --git a/test/monniaux/dm_random.c b/test/monniaux/dm_random.c new file mode 100644 index 00000000..6643b79f --- /dev/null +++ b/test/monniaux/dm_random.c @@ -0,0 +1,7 @@ +#include + +static uint32_t dm_random_uint32(void) { + static uint32_t current=UINT32_C(0xDEADBEEF); + current = ((uint64_t) current << 6) % UINT32_C(4294967291); + return current; +} -- cgit