Basic support for dedupe
[fio.git] / lib / rand.h
index d62ebe5f7ecb95005561c5021df45ab92a06a1d1..8c35ab1fa2636655ca17cd0f868b8c2ffafd0336 100644 (file)
@@ -7,6 +7,14 @@ struct frand_state {
        unsigned int s1, s2, s3;
 };
 
+static inline void frand_copy(struct frand_state *dst,
+                             struct frand_state *src)
+{
+       dst->s1 = src->s1;
+       dst->s2 = src->s2;
+       dst->s3 = src->s3;
+}
+
 static inline unsigned int __rand(struct frand_state *state)
 {
 #define TAUSWORTHE(s,a,b,c,d) ((s&c)<<d) ^ (((s <<a) ^ s)>>b)