X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-mac.h;h=ec2cc1e555f43c2bc5afce2cc35396ebd7adfc1d;hb=e9d2a04d1278ce02140a8b8da4d5aede7a6ad39d;hp=683aab3220a54f4125ebe97327be75b2a2b64d86;hpb=e7e536b665bd6a9d3e936e0847dbbb6957101da4;p=fio.git diff --git a/os/os-mac.h b/os/os-mac.h index 683aab32..ec2cc1e5 100644 --- a/os/os-mac.h +++ b/os/os-mac.h @@ -27,6 +27,12 @@ #define fio_swap32(x) OSSwapInt32(x) #define fio_swap64(x) OSSwapInt64(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 + #ifndef CONFIG_CLOCKID_T typedef unsigned int clockid_t; #endif