Remove use of OS provided random functions
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index f453d92a98d4e088744ac9e06f73382a4c4bea07..4ab28256801a40be41a29854af522c2839b74946 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -137,7 +137,6 @@ struct thread_data {
        unsigned int nr_normal_files;
        union {
                unsigned int next_file;
-               os_random_state_t next_file_state;
                struct frand_state __next_file_state;
        };
        int error;
@@ -160,22 +159,10 @@ struct thread_data {
 
        unsigned long rand_seeds[FIO_RAND_NR_OFFS];
 
-       union {
-               os_random_state_t bsrange_state;
-               struct frand_state __bsrange_state;
-       };
-       union {
-               os_random_state_t verify_state;
-               struct frand_state __verify_state;
-       };
-       union {
-               os_random_state_t trim_state;
-               struct frand_state __trim_state;
-       };
-       union {
-               os_random_state_t delay_state;
-               struct frand_state __delay_state;
-       };
+       struct frand_state __bsrange_state;
+       struct frand_state __verify_state;
+       struct frand_state __trim_state;
+       struct frand_state __delay_state;
 
        struct frand_state buf_state;
        struct frand_state buf_state_prev;
@@ -249,10 +236,7 @@ struct thread_data {
        /*
         * State for random io, a bitmap of blocks done vs not done
         */
-       union {
-               os_random_state_t random_state;
-               struct frand_state __random_state;
-       };
+       struct frand_state __random_state;
 
        struct timeval start;   /* start of this loop */
        struct timeval epoch;   /* time job was started */
@@ -277,10 +261,7 @@ struct thread_data {
        /*
         * read/write mixed workload state
         */
-       union {
-               os_random_state_t rwmix_state;
-               struct frand_state __rwmix_state;
-       };
+       struct frand_state __rwmix_state;
        unsigned long rwmix_issues;
        enum fio_ddir rwmix_ddir;
        unsigned int ddir_seq_nr;
@@ -288,10 +269,7 @@ struct thread_data {
        /*
         * rand/seq mixed workload state
         */
-       union {
-               os_random_state_t seq_rand_state[DDIR_RWDIR_CNT];
-               struct frand_state __seq_rand_state[DDIR_RWDIR_CNT];
-       };
+       struct frand_state __seq_rand_state[DDIR_RWDIR_CNT];
 
        /*
         * IO history logs for verification. We use a tree for sorting,
@@ -326,10 +304,7 @@ struct thread_data {
        /*
         * For generating file sizes
         */
-       union {
-               os_random_state_t file_size_state;
-               struct frand_state __file_size_state;
-       };
+       struct frand_state __file_size_state;
 
        /*
         * Error counts