Move unused and other attributes to the compiler section
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index c8c8b7abdd46db6e4743b2262f9047bffc7cceed..3411bb4a2c286235c0b49504bc840c5b5f948368 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -20,7 +20,6 @@ struct thread_data;
 #include "thread_options.h"
 #include "flist.h"
 #include "fifo.h"
-#include "lib/rbtree.h"
 #include "arch/arch.h"
 #include "os/os.h"
 #include "mutex.h"
@@ -37,6 +36,7 @@ struct thread_data;
 #include "gettime.h"
 #include "lib/getopt.h"
 #include "lib/rand.h"
+#include "lib/rbtree.h"
 #include "client.h"
 #include "server.h"
 #include "stat.h"
@@ -375,41 +375,6 @@ static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
 
 #define REAL_MAX_JOBS          2048
 
-static inline enum error_type_bit td_error_type(enum fio_ddir ddir, int err)
-{
-       if (err == EILSEQ)
-               return ERROR_TYPE_VERIFY_BIT;
-       if (ddir == DDIR_READ)
-               return ERROR_TYPE_READ_BIT;
-       return ERROR_TYPE_WRITE_BIT;
-}
-
-static int __NON_FATAL_ERR[] = {EIO, EILSEQ};
-static inline int td_non_fatal_error(struct thread_data *td,
-                                    enum error_type_bit etype, int err)
-{
-       int i;
-       if (!td->o.ignore_error[etype]) {
-               td->o.ignore_error[etype] = __NON_FATAL_ERR;
-               td->o.ignore_error_nr[etype] = sizeof(__NON_FATAL_ERR)
-                       / sizeof(int);
-       }
-
-       if (!(td->o.continue_on_error & (1 << etype)))
-               return 0;
-       for (i = 0; i < td->o.ignore_error_nr[etype]; i++)
-               if (td->o.ignore_error[etype][i] == err)
-                       return 1;
-       return 0;
-}
-
-static inline void update_error_count(struct thread_data *td, int err)
-{
-       td->total_err_count++;
-       if (td->total_err_count == 1)
-               td->first_error = err;
-}
-
 static inline int should_fsync(struct thread_data *td)
 {
        if (td->last_was_sync)
@@ -445,8 +410,8 @@ extern void add_job_opts(const char **, int);
 extern char *num2str(unsigned long, int, int, int, int);
 extern int ioengine_load(struct thread_data *);
 
-extern unsigned long page_mask;
-extern unsigned long page_size;
+extern uintptr_t page_mask;
+extern uintptr_t page_size;
 extern int initialize_fio(char *envp[]);
 
 #define FIO_GETOPT_JOB         0x89000000
@@ -506,13 +471,6 @@ extern int is_blktrace(const char *);
 extern int load_blktrace(struct thread_data *, const char *);
 #endif
 
-/*
- * Mark unused variables passed to ops functions as unused, to silence gcc
- */
-#define fio_unused     __attribute((__unused__))
-#define fio_init       __attribute__((constructor))
-#define fio_exit       __attribute__((destructor))
-
 #define for_each_td(td, i)     \
        for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++)
 #define for_each_file(td, f, i)        \