Merge branch 'master' into gfio
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 28198b9cbeffd99acf03c831c9ec0bbd1b7d0c89..8246e38856a22321fae6bcab9410ed401f64cabd 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -20,7 +20,7 @@ struct thread_data;
 #include "thread_options.h"
 #include "flist.h"
 #include "fifo.h"
-#include "rbtree.h"
+#include "lib/rbtree.h"
 #include "arch/arch.h"
 #include "os/os.h"
 #include "mutex.h"
@@ -99,18 +99,16 @@ struct thread_data {
                struct frand_state __next_file_state;
        };
        int error;
+       int sig;
        int done;
        pid_t pid;
        char *orig_buffer;
        size_t orig_buffer_size;
        volatile int terminate;
        volatile int runstate;
-       unsigned int ioprio;
-       unsigned int ioprio_set;
        unsigned int last_was_sync;
        enum fio_ddir last_ddir;
 
-       char *mmapfile;
        int mmapfd;
 
        void *iolog_buf;
@@ -276,6 +274,8 @@ struct thread_data {
         */
        struct prof_io_ops prof_io_ops;
        void *prof_data;
+
+       void *pinned_mem;
 };
 
 /*
@@ -314,7 +314,6 @@ extern int shm_id;
 extern int groupid;
 extern int terse_output;
 extern int temp_stall_ts;
-extern unsigned long long mlock_size;
 extern unsigned long page_mask, page_size;
 extern int read_only;
 extern int eta_print;
@@ -441,10 +440,11 @@ extern void fio_terminate_threads(int);
 /*
  * Memory helpers
  */
-extern int __must_check fio_pin_memory(void);
-extern void fio_unpin_memory(void);
+extern int __must_check fio_pin_memory(struct thread_data *);
+extern void fio_unpin_memory(struct thread_data *);
 extern int __must_check allocate_io_mem(struct thread_data *);
 extern void free_io_mem(struct thread_data *);
+extern void free_threads_shm(void);
 
 /*
  * Reset stats after ramp time completes
@@ -551,4 +551,6 @@ static inline void td_io_u_free_notify(struct thread_data *td)
 extern const char *fio_get_arch_string(int);
 extern const char *fio_get_os_string(int);
 
+#define ARRAY_SIZE(x) (sizeof((x)) / (sizeof((x)[0])))
+
 #endif