On 09/21/2011 03:40 PM, Kevin Wolf wrote:
>
> I think these two should be joinable. Otherwise, you might be
> destroying the apdu_thread_quit_mutex while the handle_apdu_thread
> hasn't yet finished unlocking it (even though it already progressed
> enough in qemu_mutex_destroy to release the main thread).
>
> Anyhow, the bug is not introduced by your patch, so
>
> Reviewed-by: Paolo Bonzini<pbonz...@redhat.com>
Actually, the man page says that joinable is the default, so this patch
does change the behaviour.
Yes, but it doesn't change the fact that mutexes are destroyed under the
thread's feet. i.e. it doesn't introduce the race.
Paolo