On 07/01/16 17:18, Paolo Bonzini wrote:
> 
> 
> On 01/07/2016 14:34, Andrew Jones wrote:
>>>>
>> With this patch, I now get
>>
>>  qemu: qemu_mutex_destroy: Device or resource busy
>>
>> and a SIGABRT when my arm tcg kvm-unit-tests guest exits
>> (I haven't tried any other guest types yet)
> 
> Eric, Laszlo, is it POSIX compliant to fail destruction of a taken mutex?

http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_destroy.html

    [...] Attempting to destroy a locked mutex or a mutex that is
    referenced (for example, while being used in a
    pthread_cond_timedwait() or pthread_cond_wait()) by another thread
    results in undefined behavior.

Thus EBUSY is POSIX compliant, because just the attempt is undefined
behavior.

Thanks
Laszlo

Reply via email to