gettime: remember to tear down clock cpumask on normal exit
[fio.git] / options.h
index b2e2c0c8fed232f9213a8647d81f266a82cae3dd..36fd35d2f6e72ed67f316b8fe4c317f89b751eff 100644 (file)
--- a/options.h
+++ b/options.h
@@ -22,6 +22,22 @@ int set_name_idx(char *, char *, int);
 
 extern struct fio_option fio_options[FIO_MAX_OPTS];
 
+extern int __fio_option_is_set(struct thread_options *, unsigned int off);
+
+#define fio_option_is_set(__td, name)                                  \
+({                                                                     \
+       const unsigned int off = td_var_offset(name);                   \
+       int __r = __fio_option_is_set((__td), off);                     \
+       if (__r == -1) {                                                \
+               dprint(FD_PARSE, "option %s/%u not found in map\n",     \
+                               __fio_stringify(name), off);            \
+               __r = 0;                                                \
+       }                                                               \
+       __r;                                                            \
+})
+
+extern void fio_option_mark_set(struct thread_options *, struct fio_option *);
+
 static inline int o_match(struct fio_option *o, const char *opt)
 {
        if (!strcmp(o->name, opt))