X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-dragonfly.h;fp=os%2Fos-dragonfly.h;h=6e46589450eaaf6b318724d61a157813e92f144d;hb=e9d2a04d1278ce02140a8b8da4d5aede7a6ad39d;hp=44bfcd5d064001722567d8c2011665b612a13d4b;hpb=14691a4df98b85621b07dd2bdc0f0a960acbb8ba;p=fio.git diff --git a/os/os-dragonfly.h b/os/os-dragonfly.h index 44bfcd5d..6e465894 100644 --- a/os/os-dragonfly.h +++ b/os/os-dragonfly.h @@ -92,6 +92,12 @@ typedef cpumask_t os_cpu_mask_t; /* No CPU_COUNT(), but use the default function defined in os/os.h */ #define fio_cpu_count(mask) CPU_COUNT((mask)) +#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 fio_cpuset_init(os_cpu_mask_t *mask) { CPUMASK_ASSZERO(*mask);