On Sat, Apr 18, 2020 at 2:03 PM Marcel Apfelbaum <marcel.apfelb...@gmail.com> wrote: > > Hi Simran, > > On 4/2/20 9:50 AM, Simran Singhal wrote: > > Replace manual lock()/unlock() calls with lock guard macros > > (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD). > > > > Signed-off-by: Simran Singhal <singhalsimr...@gmail.com> > > --- > > Changes in v2: > > -Drop changes in file hw/rdma/rdma_utils.c > > > > hw/hyperv/hyperv.c | 15 ++++++------- > > hw/rdma/rdma_backend.c | 50 +++++++++++++++++++++--------------------- > > hw/rdma/rdma_rm.c | 3 +-- > > 3 files changed, 33 insertions(+), 35 deletions(-) > > > > diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c > > index 8ca3706f5b..4ddafe1de1 100644 > > --- a/hw/hyperv/hyperv.c > > +++ b/hw/hyperv/hyperv.c > > @@ -15,6 +15,7 @@ > > #include "sysemu/kvm.h" > > #include "qemu/bitops.h" > > #include "qemu/error-report.h" > > +#include "qemu/lockable.h" > > #include "qemu/queue.h" > > #include "qemu/rcu.h" > > #include "qemu/rcu_queue.h" > > @@ -491,7 +492,7 @@ int hyperv_set_msg_handler(uint32_t conn_id, > > HvMsgHandler handler, void *data) > > int ret; > > MsgHandler *mh; > > > > - qemu_mutex_lock(&handlers_mutex); > > + QEMU_LOCK_GUARD(&handlers_mutex); > > It does not passes compilation: > export ARCH=x86_64 > make docker-image-fedora V=1 NETWORK=1 > make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu NETWORK=1
This is a problem with the macros themselves, not with this patch. This is fixed (concat '##' problem and warnings) in [PATCH v5 0/2] Replaced locks with lock guard macros and the patch should be based on it. Best regards, Julia Suvorova.