Sergey Fedorov <[email protected]> writes:
> On 27/06/16 12:36, Alex Bennée wrote:
>> Sergey Fedorov <[email protected]> writes:
>>
>>> From: Sergey Fedorov <[email protected]>
>>>
> (snip)
>>> diff --git a/cpus.c b/cpus.c
>>> index 98f60f6f98f5..bb6bd8615cfc 100644
>>> --- a/cpus.c
>>> +++ b/cpus.c
>>> @@ -932,6 +932,18 @@ static void qemu_tcg_destroy_vcpu(CPUState *cpu)
>>> {
>>> }
>>>
>>> +static void tcg_cpu_exec_start(CPUState *cpu)
>>> +{
>>> + tcg_pending_cpus++;
>>> +}
>>> +
>>> +static void tcg_cpu_exec_end(CPUState *cpu)
>>> +{
>>> + if (--tcg_pending_cpus) {
>>> + signal_cpu_work();
>>> + }
>>> +}
>> Don't these need to be atomic?
>
> 'tcg_pending_cpus' is protected by BQL.
A quick comment above the function would help then.
>
>>
>>> +
>>> static void qemu_wait_io_event_common(CPUState *cpu)
>>> {
>>> if (cpu->stop) {
>>>
> (snip)
>
> Thanks,
> Sergey
--
Alex Bennée