• V
    virNodeGetCPUMap: Define public API. · 7ecc1d81
    Viktor Mihajlovski 提交于
    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: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
    Signed-off-by: NEric Blake <eblake@redhat.com>
    7ecc1d81
driver.h 71.7 KB