From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Julia Suvorova <jusual@mail.ru>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Simran Singhal <singhalsimran0@gmail.com>,
Yuval Shaia <yuval.shaia.ml@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
rkagan@virtuozzo.com
Subject: Re: [PATCH v2] lockable: Replace locks with lock guard macros
Date: Sun, 19 Apr 2020 09:34:29 +0300 [thread overview]
Message-ID: <802550db-7e4d-549f-5358-a5ee25b969b4@gmail.com> (raw)
In-Reply-To: <CAMDeoFVipYBYCE_GTjytpXT_PvKt6xjTdtPyv=HyLYf4FkCDUQ@mail.gmail.com>
Hi Julia,
On 4/19/20 5:46 AM, Julia Suvorova wrote:
> On Sat, Apr 18, 2020 at 2:03 PM Marcel Apfelbaum
> <marcel.apfelbaum@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 <singhalsimran0@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.
Thanks for the pointer.
I'll wait for the fix to be merged then.
Thanks,
Marcel
>
> Best regards, Julia Suvorova.
next prev parent reply other threads:[~2020-04-19 6:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 6:50 [PATCH v2] lockable: Replace locks with lock guard macros Simran Singhal
2020-04-02 7:46 ` no-reply
2020-04-13 10:00 ` Yuval Shaia
2020-04-14 8:11 ` Marcel Apfelbaum
2020-04-18 12:03 ` Marcel Apfelbaum
2020-04-19 2:46 ` Julia Suvorova
2020-04-19 6:34 ` Marcel Apfelbaum [this message]
2020-04-20 9:13 ` Philippe Mathieu-Daudé
2020-04-24 10:51 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=802550db-7e4d-549f-5358-a5ee25b969b4@gmail.com \
--to=marcel.apfelbaum@gmail.com \
--cc=jusual@mail.ru \
--cc=qemu-devel@nongnu.org \
--cc=rkagan@virtuozzo.com \
--cc=singhalsimran0@gmail.com \
--cc=stefanha@gmail.com \
--cc=yuval.shaia.ml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).