qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH V3 1/3] qemu: Add qemu-wrappers for pthread


From: Paolo Bonzini
Subject: Re: [Qemu-devel] Re: [PATCH V3 1/3] qemu: Add qemu-wrappers for pthread_attr_t
Date: Fri, 04 Jun 2010 15:27:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4

On 06/04/2010 03:19 PM, Corentin Chary wrote:
The point of these wrappers AFAIU is not only to add error_exit, but also
to be portable to Windows in the future.

This is historical because the code was largely inspired by glibc's
implementation of posix-aio.  It doesn't need to be detached and since
Corentin wants to be able to join a worker, it makes sense to just avoid
detaching and pay the overhead of making the threads joinable.

Actually, I want to know if the queue is empty and if no job are
currently being processed: all worker are idle or stopped. I don't
really need pthread_join() for that, since worker can be idle (we
don't want to always start and stop the thread :) ).

Then it's also fine to have all qemu_threads detached (like in my patch to create all qemu_threads with blocked signals). I just want to avoid implementing pthreads one day for qemu-threads-win32.c.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]