]> xenbits.xensource.com Git - libvirt.git/commit
util: Rewrite virHostCPUCountThreadSiblings()
authorAndrea Bolognani <abologna@redhat.com>
Thu, 2 Aug 2018 14:15:02 +0000 (16:15 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 14 Aug 2018 13:52:32 +0000 (15:52 +0200)
commit794513e89d0dbd9a1b30f3745007bcfdb740d890
tree3e76cdda3c9badfe9ad2dbed6c41de455bc9bbfd
parent37e64f65083c858b4931ea0d2d08163bcca61651
util: Rewrite virHostCPUCountThreadSiblings()

We already have a function which parses
thread_siblings_list for a CPU and returns the
corresponding bitmap, and a bunch of utility functions
that perform operations on bitmaps such as counting
the number of set bits: use those to implement the
function instead of having an additional ad-hoc parser
for thread_siblings.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
src/util/virhostcpu.c