1/* 2 * Copyright (c) 2008 Vijay Kumar B. <vijaykumar@bravegnu.org> 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 Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19#ifndef MOVE_PAGES_SUPPORT_H 20#define MOVE_PAGES_SUPPORT_H 21 22#include "config.h" 23#if HAVE_NUMA_H 24#include <numa.h> 25#endif 26#if HAVE_NUMAIF_H 27#include <numaif.h> 28#endif 29#include <semaphore.h> 30#include "numa_helper.h" 31 32long get_page_size(); 33 34void free_pages(void **pages, unsigned int num); 35 36int alloc_pages_on_nodes(void **pages, unsigned int num, int *nodes); 37int alloc_pages_linear(void **pages, unsigned int num); 38int alloc_pages_on_node(void **pages, unsigned int num, int node); 39 40void verify_pages_on_nodes(void **pages, int *status, 41 unsigned int num, int *nodes); 42void verify_pages_linear(void **pages, int *status, unsigned int num); 43void verify_pages_on_node(void **pages, int *status, 44 unsigned int num, int node); 45 46int alloc_shared_pages_on_node(void **pages, unsigned int num, int node); 47void free_shared_pages(void **pages, unsigned int num); 48 49sem_t *alloc_sem(int num); 50void free_sem(sem_t *sem, int num); 51 52void check_config(unsigned int min_nodes); 53 54#endif 55