Re: BUG: currupt function pthread_cleanup_push definition in /usr/include/pthread.h
>>>>> Raphael Bossek writes:
> compiling my source code using the pthread_cleanup_push function dropps
> misterious errors so i checked the definition of it and found that a
> '}' is missing in line 478 (libc6-dev 2.1.2-0pre12) of
> Please correct this in the next release.
No - your program is broken. Read the comments in <pthread.h>, e.g.:
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
when the thread is cancelled or calls pthread_exit. ROUTINE will also
be called with arguments ARG when the matching pthread_cleanup_pop
is executed with non-zero EXECUTE argument.
pthread_cleanup_push and pthread_cleanup_pop are macros and must always
be used in matching pairs at the same nesting level of braces. */
The last two lines are important.
Andreas Jaeger email@example.com firstname.lastname@example.org
for pgp-key finger email@example.com