1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

allocalim.h: use __glibc_likely instead of __builtin_expect

* sysdeps/pthread/allocalim.h (__libc_use_alloca): Use __glibc_likely
	instead of __builtin_expect.
This commit is contained in:
Samuel Thibault
2018-01-30 21:42:21 +01:00
parent d31a4a4803
commit 407552cf0b
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2018-01-30 Samuel Thibault <samuel.thibault@ens-lyon.org
* sysdeps/pthread/allocalim.h (__libc_use_alloca): Use __glibc_likely
instead of __builtin_expect.
2018-01-30 Florian Weimer <fweimer@redhat.com> 2018-01-30 Florian Weimer <fweimer@redhat.com>
* nss/bug17079.c (do_test): Use nss_files only for reading passwd * nss/bug17079.c (do_test): Use nss_files only for reading passwd

View File

@ -24,9 +24,9 @@ extern __always_inline
int int
__libc_use_alloca (size_t size) __libc_use_alloca (size_t size)
{ {
return (__builtin_expect (__libc_alloca_cutoff (size), 1) return (__glibc_likely (__libc_alloca_cutoff (size))
#ifdef PTHREAD_STACK_MIN #ifdef PTHREAD_STACK_MIN
|| __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) || __glibc_likely (size <= PTHREAD_STACK_MIN / 4)
#endif #endif
); );
} }