This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
pthread_cleanup_push
- From: "Maksym Yehorov" <m dot yegorov at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 15 Jun 2007 18:16:38 +0300
- Subject: pthread_cleanup_push
Broken macro pthread_cleanup_push in glibc-2.5.
diff -Naur glibc-2.5/nptl/sysdeps/pthread/pthread.h
glibc-2.5-pthread_cleanup_push_fix/nptl/sysdeps/pthread/pthread.h
--- glibc-2.5/nptl/sysdeps/pthread/pthread.h 2006-06-05
02:59:07.000000000 +0300
+++ glibc-2.5-pthread_cleanup_push_fix/nptl/sysdeps/pthread/pthread.h
2007-06-15 17:18:42.000000000 +0300
@@ -541,8 +541,7 @@
pthread_cleanup_push and pthread_cleanup_pop are macros and must always
be used in matching pairs at the same nesting level of braces. */
# define pthread_cleanup_push(routine, arg) \
- do { \
- __pthread_cleanup_class __clframe (routine, arg)
+ do { __pthread_cleanup_class __clframe (routine, arg); } while(0)
/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
If EXECUTE is non-zero, the handler function is called. */
--
Sincerely yours,
Max Yegorov
mail-to: m.yegorov@gmail.com