2014-01-22 11:56:06 +00:00
|
|
|
/*
|
2016-04-13 17:53:02 +00:00
|
|
|
* virhostcpupriv.h: helper APIs for host CPU info
|
2014-01-22 11:56:06 +00:00
|
|
|
*
|
2016-04-13 17:53:02 +00:00
|
|
|
* Copyright (C) 2014-2016 Red Hat, Inc.
|
2014-01-22 11:56:06 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRHOSTCPUPRIV_H_ALLOW
|
2018-12-13 13:32:06 +00:00
|
|
|
# error "virhostcpupriv.h may only be included by virhostcpu.c or test suites"
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRHOSTCPUPRIV_H_ALLOW */
|
2018-12-13 13:32:06 +00:00
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRHOSTCPUPRIV_H
|
|
|
|
# define LIBVIRT_VIRHOSTCPUPRIV_H
|
2014-01-22 11:56:06 +00:00
|
|
|
|
2016-04-13 17:53:02 +00:00
|
|
|
# include "virhostcpu.h"
|
2014-01-22 11:56:06 +00:00
|
|
|
|
|
|
|
# ifdef __linux__
|
2016-04-13 17:16:16 +00:00
|
|
|
int virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
|
|
|
|
virArch arch,
|
|
|
|
unsigned int *cpus,
|
|
|
|
unsigned int *mhz,
|
|
|
|
unsigned int *nodes,
|
|
|
|
unsigned int *sockets,
|
|
|
|
unsigned int *cores,
|
|
|
|
unsigned int *threads);
|
2014-01-16 11:37:27 +00:00
|
|
|
|
2016-04-13 17:16:16 +00:00
|
|
|
int virHostCPUGetStatsLinux(FILE *procstat,
|
|
|
|
int cpuNum,
|
|
|
|
virNodeCPUStatsPtr params,
|
|
|
|
int *nparams);
|
2014-01-22 11:56:06 +00:00
|
|
|
# endif
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRHOSTCPUPRIV_H */
|