Switch to using our internal Tausworthe based random generator for offsets
[fio.git] / lib / rand.h
index 363e7b6d9651d5970c9b7b8592f61a9bc0a0962b..f80c111a53f9083d19ad0c972920732cb7a51bef 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef FIO_RAND_H
 #define FIO_RAND_H
 
+#define FRAND_MAX      (-1U)
+
 struct frand_state {
        unsigned int s1, s2, s3;
 };
@@ -19,5 +21,8 @@ static inline unsigned int __rand(struct frand_state *state)
 }
 
 extern void init_rand(struct frand_state *);
+extern void init_rand_seed(struct frand_state *, unsigned int seed);
+extern void __fill_random_buf(void *buf, unsigned int len, unsigned long seed);
+extern unsigned long fill_random_buf(void *buf, unsigned int len);
 
 #endif