| 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | #ifndef __RT_NUMA_H |
| 3 | #define __RT_NUMA_H |
| 4 | |
| 5 | #include <numa.h> |
| 6 | |
| 7 | enum { |
| 8 | AFFINITY_UNSPECIFIED, |
| 9 | AFFINITY_SPECIFIED, |
| 10 | AFFINITY_USEALL |
| 11 | }; |
| 12 | |
| 13 | int numa_initialize(void); |
| 14 | |
| 15 | int get_available_cpus(struct bitmask *cpumask); |
| 16 | int cpu_for_thread_sp(int thread_num, int max_cpus, struct bitmask *cpumask); |
| 17 | int cpu_for_thread_ua(int thread_num, int max_cpus); |
| 18 | |
| 19 | int parse_cpumask(char *str, int max_cpus, struct bitmask **cpumask); |
| 20 | |
| 21 | #endif |