gettime: Fix compilation on non-Linux with pthread_getaffinity_np()
[fio.git] / os / os-netbsd.h
index abc1d3cb70120b25244ff80e8833e1023f6f602a..624c7fa5096daf40d646886ec38a6058f26061c5 100644 (file)
 #define fio_swap32(x)  bswap32(x)
 #define fio_swap64(x)  bswap64(x)
 
+#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
+
 static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
 {
        struct disklabel dl;