Define pointer alignment macro in fio.h
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index b2dade90aa42f5242e60eb8d1696310dc8343290..14950fc89e3ab2009ee9f52c27377b1f0ee2ade2 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -619,6 +619,11 @@ extern int __must_check allocate_io_mem(struct thread_data *);
 extern void free_io_mem(struct thread_data *);
 extern void free_threads_shm(void);
 
+#ifdef FIO_INTERNAL
+#define PTR_ALIGN(ptr, mask)   \
+       (char *) (((uintptr_t) (ptr) + (mask)) & ~(mask))
+#endif
+
 /*
  * Reset stats after ramp time completes
  */