]> Git Repo - qemu.git/commit
include/qemu/lockable: Use _Generic instead of QEMU_GENERIC
authorRichard Henderson <[email protected]>
Mon, 14 Jun 2021 23:31:41 +0000 (16:31 -0700)
committerRichard Henderson <[email protected]>
Wed, 16 Jun 2021 01:31:00 +0000 (18:31 -0700)
commit4ffb0681d7de34a5286f390a19fb48709107903b
treea60d4685aa2637b4018399e52df2641706e22c04
parent6c98635ed7772e63b98944ab972c1eef8e498da3
include/qemu/lockable: Use _Generic instead of QEMU_GENERIC

This is both more and less complicated than our expansion
using __builtin_choose_expr and __builtin_types_compatible_p.

The expansion through QEMU_MAKE_LOCKABLE_ doesn't work because
we're not emumerating all of the types within the same _Generic,
which results in errors about unhandled cases.  We must also
handle void* explicitly, so that the NULL constant can be used.

Signed-off-by: Richard Henderson <[email protected]>
Tested-by: Alex Bennée <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-Id: <20210614233143.1221879[email protected]>
include/qemu/lockable.h
This page took 0.020262 seconds and 4 git commands to generate.