From: Ross Johnson <rpj@ise.canberra.edu.au>
To: Dany Joly <dany_joly@hotmail.com>, pthreads-win32@sources.redhat.com
Subject: Re: PThread Win32 problem with pthread_cleanup_push / pop
Date: Sun, 31 Oct 2004 00:15:00 -0000 [thread overview]
Message-ID: <41842E9C.3070908@ise.canberra.edu.au> (raw)
In-Reply-To: <BAY8-F41T8TXx3j037m00001749@hotmail.com>
No no. These macros are supposed to form a pair, so that together they
form the start and end of the same block.
Ross
Dany Joly wrote:
> 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
>
>
prev parent reply other threads:[~2004-10-31 0:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-30 18:43 Dany Joly
2004-10-31 0:15 ` Ross Johnson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41842E9C.3070908@ise.canberra.edu.au \
--to=rpj@ise.canberra.edu.au \
--cc=dany_joly@hotmail.com \
--cc=pthreads-win32@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).