[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] lockable: Replace locks with lock guard macros
From: |
Julia Suvorova |
Subject: |
Re: [PATCH v2] lockable: Replace locks with lock guard macros |
Date: |
Sun, 19 Apr 2020 04:46:59 +0200 |
On Sat, Apr 18, 2020 at 2:03 PM Marcel Apfelbaum
<address@hidden> 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 <address@hidden>
> > ---
> > 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.
- [PATCH v2] lockable: Replace locks with lock guard macros, Simran Singhal, 2020/04/02
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, no-reply, 2020/04/02
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, Yuval Shaia, 2020/04/13
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, Marcel Apfelbaum, 2020/04/14
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, Marcel Apfelbaum, 2020/04/18
- Re: [PATCH v2] lockable: Replace locks with lock guard macros,
Julia Suvorova <=
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, Philippe Mathieu-Daudé, 2020/04/20
- Re: [PATCH v2] lockable: Replace locks with lock guard macros, Stefan Hajnoczi, 2020/04/24