1/*
2 * Copyright (C) 2012 Linux Test Project, Inc.
3 *
4 * This program is free software;  you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY;  without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
12 * the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program;  if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18
19#ifndef NUMA_HELPER_H
20#define NUMA_HELPER_H
21
22#include "config.h"
23#ifdef HAVE_NUMA_H
24# include <numa.h>
25#endif
26#ifdef HAVE_NUMAIF_H
27# include <numaif.h>
28#endif
29
30#define NH_MEMS (1 << 0)
31#define NH_CPUS (1 << 1)
32
33unsigned long get_max_node(void);
34int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes);
35int get_allowed_nodes(int flag, int count, ...);
36void nh_dump_nodes(void);
37int is_numa(void (*cleanup_fn)(void), int flag, int min_nodes);
38
39#endif /* NUMA_HELPER_H */
40