qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 41/41] cpus: create qemu_cpu_is_vcpu()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 41/41] cpus: create qemu_cpu_is_vcpu()
Date: Fri, 21 Sep 2012 16:48:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

Am 21.09.2012 14:54, schrieb Paolo Bonzini:
> Il 21/09/2012 10:47, Juan Quintela ha scritto:
>> Old code used !io_thread to know if a thread was an vcpu or not.  That
>> fails when we introduce the iothread.
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>>  cpus.c | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index e476a3c..1b7061a 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -902,6 +902,11 @@ int qemu_cpu_is_self(void *_env)
>>      return qemu_thread_is_self(cpu->thread);
>>  }
>>
>> +static bool qemu_cpu_is_vcpu(void)
>> +{
>> +    return cpu_single_env && qemu_cpu_is_self(&cpu_single_env);
> 
> Should be "cpu_single_env && qemu_cpu_is_self(&cpu_single_env)".

"cpu_single_env && qemu_cpu_is_self(cpu_single_env)" maybe?

> Please named the function qemu_in_vcpu_thread.

Seconded, it does not take a CPU argument.

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]