mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 21:50:33 +00:00
qemu: Document qemu_arch_available() method
qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Since its argument is a mask of bits, rename it as @arch_bitmask. We have less than 32 target architectures so far, so restrict it to the uint32_t type. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20260213175032.32121-2-philmd@linaro.org>
This commit is contained in:
@@ -25,6 +25,12 @@ enum {
|
||||
QEMU_ARCH_LOONGARCH = (1 << 23),
|
||||
};
|
||||
|
||||
bool qemu_arch_available(unsigned qemu_arch_mask);
|
||||
/**
|
||||
* qemu_arch_available:
|
||||
* @arch_bitmask: bitmask of QEMU_ARCH_* constants
|
||||
*
|
||||
* Return whether the current target architecture is contained in @arch_bitmask
|
||||
*/
|
||||
bool qemu_arch_available(uint32_t arch_bitmask);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/arch_init.h"
|
||||
|
||||
bool qemu_arch_available(unsigned qemu_arch_mask)
|
||||
bool qemu_arch_available(uint32_t arch_bitmask)
|
||||
{
|
||||
return qemu_arch_mask & QEMU_ARCH;
|
||||
return arch_bitmask & QEMU_ARCH;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user