Author: aurel32
Date: 2012-06-04 10:49:21 +0000 (Mon, 04 Jun 2012)
New Revision: 5283

Added:
   glibc-package/trunk/debian/patches/any/cvs-pthread-builtin-expect.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/any/cvs-pthread-builtin-expect.diff: new patch from upstream to
    use __builtin_expect in public headers only on GCC compilers.  Closes:
    #674412.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2012-06-03 20:52:09 UTC (rev 
5282)
+++ glibc-package/trunk/debian/changelog        2012-06-04 10:49:21 UTC (rev 
5283)
@@ -1,6 +1,9 @@
 eglibc (2.13-34) UNRELEASED; urgency=low
 
-  * 
+  [ Aurelien Jarno ]
+  * patches/any/cvs-pthread-builtin-expect.diff: new patch from upstream to
+    use __builtin_expect in public headers only on GCC compilers.  Closes:
+    #674412.
 
  -- Aurelien Jarno <aure...@debian.org>  Sun, 03 Jun 2012 22:51:53 +0200
 

Added: glibc-package/trunk/debian/patches/any/cvs-pthread-builtin-expect.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-pthread-builtin-expect.diff      
                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-pthread-builtin-expect.diff      
2012-06-04 10:49:21 UTC (rev 5283)
@@ -0,0 +1,51 @@
+2012-06-04  Siddhesh Poyarekar  <siddh...@redhat.com>
+           Jakub Jelinek  <ja...@redhat.com>
+
+       [BZ #14188]
+       * nptl/sysdeps/pthread/pthread.h
+       [!(defined __GNUC__ && defined __EXCEPTIONS)]
+       (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
+       __libc_unlikely instead of __builtin_expect.
+
+2012-06-04  Siddhesh Poyarekar  <siddh...@redhat.com>
+           Jakub Jelinek  <ja...@redhat.com>
+
+       [BZ #14188]
+       * misc/sys/cdefs.h (__glibc_unlikely): New macro to wrap cases
+       where __builtin_expect is unavailable.
+
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -369,6 +369,12 @@
+ # endif
+ #endif
+ 
++#if __GNUC__ >= 3
++# define __glibc_unlikely(cond) __builtin_expect((cond), 0)
++#else
++# define __glibc_unlikely(cond) (cond)
++#endif
++
+ #include <bits/wordsize.h>
+ 
+ #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+--- a/nptl/sysdeps/pthread/pthread.h
++++ b/nptl/sysdeps/pthread/pthread.h
+@@ -659,7 +659,7 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame 
*__frame)
+     void *__cancel_arg = (arg);                                               
      \
+     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     
\
+                                       __cancel_buf.__cancel_jmp_buf, 0);    \
+-    if (__builtin_expect (__not_first_call, 0))                               
      \
++    if (__glibc_unlikely (__not_first_call))                                \
+       {                                                                       
      \
+       __cancel_routine (__cancel_arg);                                      \
+       __pthread_unwind_next (&__cancel_buf);                                \
+@@ -694,7 +694,7 @@ extern void __pthread_unregister_cancel 
(__pthread_unwind_buf_t *__buf)
+     void *__cancel_arg = (arg);                                               
      \
+     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     
\
+                                       __cancel_buf.__cancel_jmp_buf, 0);    \
+-    if (__builtin_expect (__not_first_call, 0))                               
      \
++    if (__glibc_unlikely (__not_first_call))                        \
+       {                                                                       
      \
+       __cancel_routine (__cancel_arg);                                      \
+       __pthread_unwind_next (&__cancel_buf);                                \

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2012-06-03 20:52:09 UTC (rev 
5282)
+++ glibc-package/trunk/debian/patches/series   2012-06-04 10:49:21 UTC (rev 
5283)
@@ -360,3 +360,4 @@
 any/cvs-getpwuid-nsswitch.diff
 any/local-sunrpc-dos.diff
 any/cvs-ld.so-rpath-origin.diff
+any/cvs-pthread-builtin-expect.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1sbuqf-0005h2...@vasks.debian.org

Reply via email to