backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD
commitbf5dcf8f2cf61283a46aea14867adbec1a20fe3d
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 12 May 2021 07:07:13 +0000 (12 09:07 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 13 May 2021 15:43:56 +0000 (13 17:43 +0200)
tree1f397e5938ab06ad9f2dcb0107db874dfb220e3c
parent3e9f48bcdabe57f8f90cf19f01bbbf3c86937267
backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD

Simplify the tpm_emulator_ctrlcmd() handler by replacing a pair of
qemu_mutex_lock/qemu_mutex_unlock calls by the WITH_QEMU_LOCK_GUARD
macro.

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Christophe de Dinechin <dinechin@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210512070713.3286188-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
backends/tpm/tpm_emulator.c