+ ret = 0;
+ for (i = 0; i < num_cpus; i++) {
+ if (cpus[i] == cpu) {
+ ret = 1;
+ break;
+ }
+ }
+
+ 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;
+