This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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_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


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