From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56379 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OK9gO-0005Oz-51 for qemu-devel@nongnu.org; Thu, 03 Jun 2010 08:38:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OK9gJ-00019y-6f for qemu-devel@nongnu.org; Thu, 03 Jun 2010 08:38:00 -0400 Received: from mail-ww0-f45.google.com ([74.125.82.45]:50696) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK9gJ-00019g-1z for qemu-devel@nongnu.org; Thu, 03 Jun 2010 08:37:55 -0400 Received: by wwb13 with SMTP id 13so36145wwb.4 for ; Thu, 03 Jun 2010 05:37:53 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C07A219.8090801@redhat.com> Date: Thu, 03 Jun 2010 14:37:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20100603085223.25546.88499.stgit@localhost.localdomain> <20100603085623.25546.14585.stgit@localhost.localdomain> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH V3 2/3] qemu: Generic asynchronous threading framework to offload tasks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Qemu-development List , Anthony Liguori , Avi Kivity , "Aneesh Kumar K.V" , Gautham R Shenoy On 06/03/2010 01:41 PM, Corentin Chary wrote: >> + if (sigprocmask(SIG_SETMASK,&set,&oldset)) { >> + async_abort(errno, "sigprocmask"); >> + } >> + >> + qemu_thread_create_attr(&thread,&attr, async_worker_thread, queue); >> + >> + if (sigprocmask(SIG_SETMASK,&oldset, NULL)) { >> + async_abort(errno, "sigprocmask restore"); >> + } I wonder if qemu_thread_create shouldn't block all signals by default. Then the cpu and iothreads can unblock whatever they want. I'll send a patch shortly. In any case, please use pthread_sigmask instead of sigprocmask. Paolo