From: Paolo Bonzini <pbonzini@redhat.com>
To: Jun Koi <junkoi2004@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [Patch] Simplify cpu_can_run()
Date: Mon, 12 Apr 2010 09:03:32 +0200 [thread overview]
Message-ID: <4BC2C5C4.3030509@redhat.com> (raw)
In-Reply-To: <w2zfdaac4d51004112324ocebd7e86oce6f3a92539f0b19@mail.gmail.com>
On 04/12/2010 08:24 AM, Jun Koi wrote:
> diff --git a/cpus.c b/cpus.c
> index 0debe77..4adb66d 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -98,9 +98,7 @@ static void do_vm_stop(int reason)
>
> static int cpu_can_run(CPUState *env)
> {
> - if (env->stop)
> - return 0;
> - if (env->stopped || !vm_running)
> + if (env->stop || env->stopped || !vm_running)
> return 0;
> return 1;
> }
I left it this way on purpose to help comparison with cpu_has_work.
static int cpu_can_run(CPUState *env)
{
if (env->stop)
return 0;
if (env->stopped || !vm_running)
return 0;
return 1;
}
static int cpu_has_work(CPUState *env)
{
if (env->stop)
return 1;
if (env->stopped || !vm_running)
return 0;
Paolo
prev parent reply other threads:[~2010-04-12 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 6:24 [Qemu-devel] [Patch] Simplify cpu_can_run() Jun Koi
2010-04-12 7:03 ` 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=4BC2C5C4.3030509@redhat.com \
--to=pbonzini@redhat.com \
--cc=junkoi2004@gmail.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.