projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
client: dec sum_stat_clients if one a client is disconnected
[fio.git]
/
lib
/
rand.h
diff --git
a/lib/rand.h
b/lib/rand.h
index 02e68585420b942fb7805375308a2f1d77ef91c8..6b9e13c03acd77895d1fbe32e2dd88de10cbfa26 100644
(file)
--- a/
lib/rand.h
+++ b/
lib/rand.h
@@
-1,12
+1,12
@@
#ifndef FIO_RAND_H
#define FIO_RAND_H
#ifndef FIO_RAND_H
#define FIO_RAND_H
+#define FRAND_MAX (-1U)
+
struct frand_state {
unsigned int s1, s2, s3;
};
struct frand_state {
unsigned int s1, s2, s3;
};
-extern struct frand_state __fio_rand_state;
-
static inline unsigned int __rand(struct frand_state *state)
{
#define TAUSWORTHE(s,a,b,c,d) ((s&c)<<d) ^ (((s <<a) ^ s)>>b)
static inline unsigned int __rand(struct frand_state *state)
{
#define TAUSWORTHE(s,a,b,c,d) ((s&c)<<d) ^ (((s <<a) ^ s)>>b)
@@
-19,7
+19,8
@@
static inline unsigned int __rand(struct frand_state *state)
}
extern void init_rand(struct frand_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 void __fill_random_buf(void *buf, unsigned int len, unsigned long seed);
-extern unsigned long fill_random_buf(void *buf, unsigned int len);
+extern unsigned long fill_random_buf(
struct frand_state *,
void *buf, unsigned int len);
#endif
#endif