From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11650 invoked by alias); 5 Jun 2006 18:12:13 -0000 Received: (qmail 11642 invoked by uid 22791); 5 Jun 2006 18:12:13 -0000 X-Spam-Check-By: sourceware.org Received: from mail130.messagelabs.com (HELO mail130.messagelabs.com) (216.82.250.163) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 05 Jun 2006 18:12:09 +0000 X-VirusChecked: Checked X-Env-Sender: John.Bossom@Cognos.COM X-Msg-Ref: server-15.tower-130.messagelabs.com!1149531124!3362746!1 X-StarScan-Version: 5.5.9.1; banners=-,-,- Received: (qmail 7809 invoked from network); 5 Jun 2006 18:12:05 -0000 Received: from nomad.cognos.com (HELO nomad.cognos.com) (205.210.232.62) by server-15.tower-130.messagelabs.com with SMTP; 5 Jun 2006 18:12:05 -0000 Received: from sottemail2.ent.ad.cognos.com ([10.67.10.28]) by nomad.cognos.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 5 Jun 2006 14:12:04 -0400 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: problem in pthread.h Date: Mon, 05 Jun 2006 18:12:00 -0000 Message-ID: <4ABB890A1781774888DB6505E6F0E3B36E9606@sottemail2.ent.ad.cognos.com> From: "Bossom, John" To: "Romano Paolo Tenca" , "Pthreads-Win32 list" X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2006/txt/msg00034.txt.bz2 The pthread_cleanup_push defines a scoped block that is completed by the pop macro. This scoping is necessary in order that the internal local variable, _cleanup, still exists at when the pop is actually called. The pop expects the values in the _cleanup to still be available. -----Original Message----- From: pthreads-win32-owner@sourceware.org [mailto:pthreads-win32-owner@sourceware.org] On Behalf Of Romano Paolo Tenca Sent: Monday, June 05, 2006 2:06 PM To: Pthreads-Win32 list Subject: problem in pthread.h In pthread.h 2.7.0 line 762 i find: #define pthread_cleanup_push( _rout, _arg ) \ { \ ptw32_cleanup_t _cleanup; \ \ ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ #define pthread_cleanup_pop( _execute ) \ (void) ptw32_pop_cleanup( _execute ); \ } It seems to me that it must be: #define pthread_cleanup_push( _rout, _arg ) \ { \ ptw32_cleanup_t _cleanup; \ ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ } #define pthread_cleanup_pop( _execute ) \ (void) ptw32_pop_cleanup( _execute ); -- Romano Paolo Tenca =20 This message may contain privileged and/or confidential information. = If you have received this e-mail in error or are not the intended recipient= , you may not use, copy, disseminate or distribute it; do not open any atta= chments, delete it immediately from your system and notify the sender promp= tly by e-mail that you have done so. Thank you.