]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNodeGetCPUMap: Define public API.
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Tue, 23 Oct 2012 20:34:53 +0000 (14:34 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 24 Oct 2012 00:46:47 +0000 (18:46 -0600)
commit7ecc1d814a72ee80e68bb3e792e00780f0567e5f
tree25f93208764821aaa7a36f9867e9b24ab5b810f3
parent5a2e1185bd4a4336dc68caf783f3d7a21bf22fed
virNodeGetCPUMap: Define public API.

Adding a new API to obtain information about the
host node's present, online and offline CPUs.

int virNodeGetCPUMap(virConnectPtr conn,
                     unsigned char **cpumap,
                     unsigned int *online,
                     unsigned int flags);

The function will return the number of CPUs present on the host
or -1 on failure;
If cpumap is non-NULL virNodeGetCPUMap will allocate an array
containing a bit map representation of the online CPUs. It's
the callers responsibility to deallocate cpumap using free().
If online is non-NULL, the variable pointed to will contain
the number of online host node CPUs.
The variable flags has been added to support future extensions
and must be set to 0.

Extend the driver structure by nodeGetCPUMap entry in support of the
new API virNodeGetCPUMap.
Added implementation of virNodeGetCPUMap to libvirt.c

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
include/libvirt/libvirt.h.in
python/generator.py
src/driver.h
src/libvirt.c
src/libvirt_public.syms