qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Elena Afanasova <eafanasova@gmail.com>, John Snow <jsnow@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH] job: delete job_{lock, unlock} functions and replace them with lock guard
Date: Wed, 30 Sep 2020 15:17:58 +0200	[thread overview]
Message-ID: <072ee259-f3e1-a354-abec-58cfe3d0d4ac@redhat.com> (raw)
In-Reply-To: <db5d1fc04bdb15da6c9ecf65402a784aab856ede.camel@gmail.com>

On 30/09/20 14:15, Elena Afanasova wrote:
>>> +    WITH_QEMU_LOCK_GUARD(&job_mutex) {
>>> +        if (ns != -1) {
>>> +            timer_mod(&job->sleep_timer, ns);
>>> +        }
>>> +        job->busy = false;
>>> +        job_event_idle(job);
>> Is this new macro safe to use in a coroutine context?
> Hi, I suppose it's safe. It would be nice to get some more opinions
> here.
> 

Yes, the macro is just a wrapper around the qemu_mutex_lock/unlock
functions (or qemu_co_mutex_lock/unlock depending on the type of its
argument).

Paolo



      reply	other threads:[~2020-09-30 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 13:42 [PATCH] job: delete job_{lock, unlock} functions and replace them with lock guard Elena Afanasova
2020-09-29 18:04 ` John Snow
2020-09-30 12:15   ` [PATCH] job: delete job_{lock,unlock} " Elena Afanasova
2020-09-30 13:17     ` Paolo Bonzini [this message]

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=072ee259-f3e1-a354-abec-58cfe3d0d4ac@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eafanasova@gmail.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).