backend: ensure that server side releases/frees shm segment on exit
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index db0e8756fe71c0ddcfc0e9394b111ba521dddcb9..6a7bd03ca92fa00d84719551cdfc673712a80511 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"
@@ -66,8 +66,8 @@ struct thread_data {
        void *eo;
        char verror[FIO_VERROR_SIZE];
        pthread_t thread;
-       int thread_number;
-       int groupid;
+       unsigned int thread_number;
+       unsigned int groupid;
        struct thread_stat ts;
 
        int client_type;
@@ -310,7 +310,6 @@ enum {
 
 extern int exitall_on_terminate;
 extern unsigned int thread_number;
-extern unsigned int nr_process, nr_thread;
 extern int shm_id;
 extern int groupid;
 extern int terse_output;
@@ -414,6 +413,7 @@ extern int initialize_fio(char *envp[]);
  */
 extern void print_thread_status(void);
 extern void print_status_init(int);
+extern char *fio_uint_to_kmg(unsigned int val);
 
 /*
  * Thread life cycle. Once a thread has a runstate beyond TD_INITIALIZED, it
@@ -445,6 +445,7 @@ extern int __must_check fio_pin_memory(void);
 extern void fio_unpin_memory(void);
 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 +552,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