hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD
authorMahmoud Mandour <ma.mandourr@gmail.com>
Thu, 11 Mar 2021 03:15:37 +0000 (05:15 +0200)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Tue, 16 Mar 2021 10:41:49 +0000 (11:41 +0100)
commite4fd889f51094a8e76274ca1e9e0ed70375166f0
treeac851c9b28e238b0a47ee733391fb55dfcc61674
parent2615a5e433aeb812c300d3a48e1a88e1303e2339
hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

Replaced a call to qemu_mutex_lock and its respective call to
qemu_mutex_unlock and used QEMU_LOCK_GUARD macro in their place.
This simplifies the code by removing the call required to unlock
and also eliminates goto paths.

Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
Acked-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20210311031538.5325-9-ma.mandourr@gmail.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
hw/9pfs/9p-synth.c