+/*
+ * pset binding hooks for fio
+ */
+#define fio_setaffinity(td) \
+ pset_bind((td)->o.cpumask, P_PID, (td)->pid)
+#define fio_getaffinity(pid, ptr) \
+ sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))
+
+#define fio_cpu_clear(mask, cpu) pset_assign(*(mask), (cpu), PS_NONE)
+#define fio_cpu_set(mask, cpu) pset_assign(*(mask), (cpu), PS_MYID)
+#define fio_cpuset_init(td) pset_create(&(td)->o.cpumask)
+#define fio_cpuset_exit(td) pset_destroy((td)->o.cpumask)
+
+/*
+ * Should be enough, not aware of what (if any) restrictions Solaris has
+ */
+#define FIO_MAX_CPUS 16384
+