+static inline enum fio_ddir acct_ddir(struct io_u *io_u)
+{
+ if (io_u->acct_ddir != -1)
+ return io_u->acct_ddir;
+
+ return io_u->ddir;
+}
+
+static inline void io_u_clear(struct io_u *io_u, unsigned int flags)
+{
+ __sync_fetch_and_and(&io_u->flags, ~flags);
+}
+
+static inline void io_u_set(struct io_u *io_u, unsigned int flags)
+{
+ __sync_fetch_and_or(&io_u->flags, flags);
+}
+