Add support for O_ATOMIC
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 1e924d3360b423201cab1cfce1288864d8559c5e..715f2260a3f6992b13e2e6f164511b7a08e54e82 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -90,6 +90,12 @@ typedef unsigned long os_cpu_mask_t;
 #define OS_O_DIRECT                    O_DIRECT
 #endif
 
+#ifdef OS_O_ATOMIC
+#define FIO_O_ATOMIC                   OS_O_ATOMIC
+#else
+#define FIO_O_ATOMIC                   0
+#endif
+
 #ifndef FIO_HAVE_HUGETLB
 #define SHM_HUGETLB                    0
 #define MAP_HUGETLB                    0
@@ -127,7 +133,11 @@ typedef unsigned long os_cpu_mask_t;
 #endif
 
 #ifndef FIO_PREFERRED_CLOCK_SOURCE
+#ifdef CONFIG_CLOCK_GETTIME
 #define FIO_PREFERRED_CLOCK_SOURCE     CS_CGETTIME
+#else
+#define FIO_PREFERRED_CLOCK_SOURCE     CS_GTOD
+#endif
 #endif
 
 #ifndef FIO_MAX_JOBS