This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch, master, updated. glibc-2.15-1139-g4af3879


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  4af3879c26dd1c91d68d87189587bcc8ecd3dcfc (commit)
      from  2fd6ff133bc7df197ff3c00f50b3f9a485095b9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4af3879c26dd1c91d68d87189587bcc8ecd3dcfc

commit 4af3879c26dd1c91d68d87189587bcc8ecd3dcfc
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Mon Jun 4 11:41:24 2012 +0530

    Wrap __builtin_expect in pthread.h
    
    [BZ #14188]
    This fixes compilation of programs using pthread_cleanup_push built
    with non-gcc compilers and older gcc compilers.

diff --git a/ChangeLog b/ChangeLog
index e207e4e..365ff82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #14188]
+	* misc/sys/cdefs.h (__glibc_unlikely): New macro to wrap cases
+	where __builtin_expect is unavailable.
+
 2012-06-03  David S. Miller  <davem@davemloft.net>
 
 	* stdlib/longlong.h: Updated from GCC.
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index f4e96db..b94147e 100644
--- 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
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index f966467..2bc3585 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,12 @@
+2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #14188]
+	* sysdeps/pthread/pthread.h
+	[!(defined __GNUC__ && defined __EXCEPTIONS)]
+	(pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
+	__libc_unlikely instead of __builtin_expect.
+
 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #14117]
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 88c7c25..246c1a0 100644
--- 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);				      \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    7 +++++++
 misc/sys/cdefs.h               |    6 ++++++
 nptl/ChangeLog                 |    9 +++++++++
 nptl/sysdeps/pthread/pthread.h |    4 ++--
 4 files changed, 24 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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