summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/affinity.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/affinity.h')
-rw-r--r--tools/perf/util/affinity.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/util/affinity.h b/tools/perf/util/affinity.h
new file mode 100644
index 0000000000..0ad6a18ef2
--- /dev/null
+++ b/tools/perf/util/affinity.h
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef PERF_AFFINITY_H
+#define PERF_AFFINITY_H 1
+
+#include <stdbool.h>
+
+struct affinity {
+ unsigned long *orig_cpus;
+ unsigned long *sched_cpus;
+ bool changed;
+};
+
+void affinity__cleanup(struct affinity *a);
+void affinity__set(struct affinity *a, int cpu);
+int affinity__setup(struct affinity *a);
+
+#endif // PERF_AFFINITY_H