Merge branch 'pthread_getaffinity_1' of https://github.com/kusumi/fio
[fio.git] / os / os-android.h
index 3c050776249c426a75834e3cb244f3a844cc09aa..3f1aa9d30abec412ffb9c72cfd08aae8ebe9c487 100644 (file)
 #define MAP_HUGETLB 0x40000 /* arch specific */
 #endif
 
+#ifdef CONFIG_PTHREAD_GETAFFINITY
+#define FIO_HAVE_GET_THREAD_AFFINITY
+#define fio_get_thread_affinity(mask)  \
+       pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask))
+#endif
+
 #ifndef CONFIG_NO_SHM
 /*
  * Bionic doesn't support SysV shared memeory, so implement it using ashmem