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
Am 21.09.2011 09:16, schrieb Paolo Bonzini:
> On 09/20/2011 06:53 PM, Jan Kiszka wrote:
>> -qemu_thread_create(&thread_id, event_thread, card);
>> -qemu_thread_create(&thread_id, handle_apdu_thread, card);
>> +qemu_thread_create(&thread_id, event_thread, card,
>> QEMU_THREAD_DETACHED);
On 09/20/2011 06:53 PM, Jan Kiszka wrote:
-qemu_thread_create(&thread_id, event_thread, card);
-qemu_thread_create(&thread_id, handle_apdu_thread, card);
+qemu_thread_create(&thread_id, event_thread, card, QEMU_THREAD_DETACHED);
+qemu_thread_create(&thread_id, handle_apdu_thread,
Allow to control if a QEMU thread is created joinable or not. Make it
not joinable by default to avoid that we keep the associated resources
around when terminating a thread without joining it (what we couldn't do
so far for obvious reasons).
The audio subsystem will need the join feature when con