+ free(cpus);
+ return ret;
+}
+
+static inline int fio_cpu_count(os_cpu_mask_t *mask)
+{
+ unsigned int num_cpus;
+
+ if (pset_info(*mask, NULL, &num_cpus, NULL) < 0)
+ return 0;
+
+ return num_cpus;
+}
+
+static inline int fio_cpuset_init(os_cpu_mask_t *mask)
+{
+ if (pset_create(mask) < 0)
+ return -1;
+