/* This is supposed to equal (sizeof(cpumask_t)*8) */
#define FIO_MAX_CPUS SMP_MAXCPU
-typedef off_t off64_t;
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);
* ioprio_set() with 4 arguments, so define fio's ioprio_set() as a macro.
* Note that there is no idea of class within ioprio_set(2) unlike Linux.
*/
+#define ioprio_value(ioprio_class, ioprio) (ioprio)
#define ioprio_set(which, who, ioprio_class, ioprio) \
ioprio_set(which, who, ioprio)