diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-06-04 11:41:24 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-06-04 11:53:57 +0530 |
commit | 4af3879c26dd1c91d68d87189587bcc8ecd3dcfc (patch) | |
tree | ab8cf6b2af267b9da893166764a19854874d1437 /nptl/sysdeps/pthread/pthread.h | |
parent | 2fd6ff133bc7df197ff3c00f50b3f9a485095b9c (diff) | |
download | glibc-4af3879c26dd1c91d68d87189587bcc8ecd3dcfc.zip glibc-4af3879c26dd1c91d68d87189587bcc8ecd3dcfc.tar.gz glibc-4af3879c26dd1c91d68d87189587bcc8ecd3dcfc.tar.bz2 |
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.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread.h')
-rw-r--r-- | nptl/sysdeps/pthread/pthread.h | 4 |
1 files changed, 2 insertions, 2 deletions
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); \ |