summaryrefslogtreecommitdiff
path: root/sysdeps/pthread/allocalim.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/allocalim.h')
-rw-r--r--sysdeps/pthread/allocalim.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/pthread/allocalim.h b/sysdeps/pthread/allocalim.h
index 076889463b..99f74838dd 100644
--- a/sysdeps/pthread/allocalim.h
+++ b/sysdeps/pthread/allocalim.h
@@ -1,5 +1,5 @@
/* Determine whether block of given size can be allocated on the stack or not.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,9 @@ extern __always_inline
int
__libc_use_alloca (size_t size)
{
- return (__builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
- || __builtin_expect (__libc_alloca_cutoff (size), 1));
+ return (__glibc_likely (__libc_alloca_cutoff (size))
+#ifdef PTHREAD_STACK_MIN
+ || __glibc_likely (size <= PTHREAD_STACK_MIN / 4)
+#endif
+ );
}