This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PThread Win32 problem with pthread_cleanup_push / pop


Hi,

I am unable to compile a VC++project (with .NET 2003 and 6.0) that uses the pthread_cleanup_push and pthread_cleanup_pop macro defined in pthread.h without replacing the following code at line 686 of pthread.h:

Previous ( '}' seems to be missing):

#ifdef __CLEANUP_C

       /*
        * C implementation of PThreads cancel cleanup
        */

#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 ); \
       }

#else /* __CLEANUP_C */


New (only added '}' at the end of the macro):


#ifdef __CLEANUP_C

       /*
        * C implementation of PThreads cancel cleanup
        */

#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 ); \
}


#else /* __CLEANUP_C */


I compared the header with older versions from 2002 and this has been unchanged for 2 years. Is it really a bug or something I don't understand?



Thank you, Dany



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]