On 16/12/2014 10:36, Frederic Konrad wrote:
> On 16/12/2014 10:31, Paolo Bonzini wrote:
>>
>> On 16/12/2014 10:13, fred.kon...@greensocs.com wrote:
>>> From: KONRAD Frederic <fred.kon...@greensocs.com>
>>>
>>> This adds a lock to avoid multiple exclusive access at the same time
>>> in case of
>>> TCG multithread.
>>>
>>> Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com>
>>> ---
>>>   target-arm/cpu.c       | 15 +++++++++++++++
>>>   target-arm/cpu.h       |  3 +++
>>>   target-arm/helper.h    |  3 +++
>>>   target-arm/op_helper.c | 10 ++++++++++
>>>   target-arm/translate.c |  6 ++++++
>>>   5 files changed, 37 insertions(+)
> [..]
>>>       g_hash_table_destroy(cpu->cp_regs);
>>> +    qemu_mutex_destroy(&cpu_exclusive_lock);
>> No need for this, and for -smp 2 it will cause the same lock to be
>> destroyed twice.
>>
>> Paolo
> Hi Paolo,
> 
> Good point for SMP!
> The mutex doesn't need to be destroyed?

Not if it's just one for the whole process.  Exiting QEMU will take care
of it.

Paolo

Reply via email to