From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39020 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OK4pX-000568-D6 for qemu-devel@nongnu.org; Thu, 03 Jun 2010 03:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OK4pW-0005aG-0j for qemu-devel@nongnu.org; Thu, 03 Jun 2010 03:27:07 -0400 Received: from mail-ww0-f45.google.com ([74.125.82.45]:35489) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK4pV-0005a4-St for qemu-devel@nongnu.org; Thu, 03 Jun 2010 03:27:05 -0400 Received: by wwb13 with SMTP id 13so2264845wwb.4 for ; Thu, 03 Jun 2010 00:27:04 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C075944.7010001@redhat.com> Date: Thu, 03 Jun 2010 09:27:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1275118686-15649-1-git-send-email-corentincj@iksaif.net> <1275118686-15649-3-git-send-email-corentincj@iksaif.net> In-Reply-To: <1275118686-15649-3-git-send-email-corentincj@iksaif.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/3] qemu-thread: add cleanup_push() and cleanup_pop() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Anthony Liguori , Alexander Graf , Adam Litke , qemu-devel@nongnu.org, Gautham R Shenoy On 05/29/2010 09:38 AM, Corentin Chary wrote: > Signed-off-by: Corentin Chary > --- > qemu-thread.h | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/qemu-thread.h b/qemu-thread.h > index 19bb30c..e5006bb 100644 > --- a/qemu-thread.h > +++ b/qemu-thread.h > @@ -41,4 +41,8 @@ void qemu_thread_self(QemuThread *thread); > int qemu_thread_equal(QemuThread *thread1, QemuThread *thread2); > void qemu_thread_exit(void *retval); > > +#define qemu_thread_cleanup_pop(execute) pthread_cleanup_pop(execute) > +#define qemu_thread_cleanup_push(routine, arg) \ > + pthread_cleanup_push(routine, arg) I agree with Paul that this isn't necessary. Also you're not using pthread_exit. Probably stale from a previous version of the patch? Paolo