+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.
# 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
+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]
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); \
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); \