From: Paolo Bonzini <pbonzini@redhat.com>
To: fred.konrad@greensocs.com, qemu-devel@nongnu.org, mttcg@greensocs.com
Cc: mark.burton@greensocs.com, alex.bennee@linaro.org,
a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] cpus: protect queued_work_* with work_mutex.
Date: Fri, 10 Jul 2015 17:22:20 +0200 [thread overview]
Message-ID: <559FE32C.5030609@redhat.com> (raw)
In-Reply-To: <1436541553-26576-2-git-send-email-fred.konrad@greensocs.com>
On 10/07/2015 17:19, fred.konrad@greensocs.com wrote:
> + qemu_mutex_lock(&cpu->work_mutex);
> while ((wi = cpu->queued_work_first)) {
> cpu->queued_work_first = wi->next;
> wi->func(wi->data);
Please unlock the mutex while calling the callback.
Paolo
> @@ -905,6 +912,8 @@ static void flush_queued_work(CPUState *cpu)
> }
> }
> cpu->queued_work_last = NULL;
> + qemu_mutex_unlock(&cpu->work_mutex);
> +
> qemu_cond_broadcast(&qemu_work_cond);
next prev parent reply other threads:[~2015-07-10 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 15:19 [Qemu-devel] [RFC PATCH 0/3] Multithread TCG async_safe_work part fred.konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 1/3] cpus: protect queued_work_* with work_mutex fred.konrad
2015-07-10 15:22 ` Paolo Bonzini [this message]
2015-07-10 15:32 ` Frederic Konrad
2015-07-10 15:34 ` Paolo Bonzini
2015-07-10 15:43 ` Frederic Konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 2/3] cpus: add a tcg_executing flag fred.konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 3/3] cpus: introduce async_run_safe_work_on_cpu fred.konrad
2015-07-10 15:23 ` Paolo Bonzini
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=559FE32C.5030609@redhat.com \
--to=pbonzini@redhat.com \
--cc=a.rigo@virtualopensystems.com \
--cc=alex.bennee@linaro.org \
--cc=fred.konrad@greensocs.com \
--cc=guillaume.delbergue@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=mttcg@greensocs.com \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.