]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Accept TIDs for virProcess{Get,Set}Affinity() on BSD
authorAndrea Bolognani <abologna@redhat.com>
Fri, 23 Feb 2024 00:29:28 +0000 (01:29 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 19 Mar 2024 17:34:25 +0000 (18:34 +0100)
commitdc0dc848ee8036403a00d10956073e649ee51548
treeb2999879e58e037f6099f2fcc22b138fec3a9556
parentc836887a0293977a93845f79294fb69778d5435f
util: Accept TIDs for virProcess{Get,Set}Affinity() on BSD

Depending on the situation, the IDs that we pass to these
functions can be either referring to processes or threads.

Linux doesn't have separate interfaces for one or the other,
but FreeBSD does and we're explicitly telling it that the ID
refers to a process. When it refers to a thread instead, the
call will fail, and the VM will not be able to start.

Luckily, another possible choice is CPU_WHICH_TIDPID, which
makes things behave the same as Linux.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virprocess.c