aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 172f002d9b..74f3e9a82a 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -107,6 +107,7 @@ __find_in_stack_list (pd)
/* Deallocate POSIX thread-local-storage. */
static void
+internal_function
deallocate_tsd (struct pthread *pd)
{
/* Maybe no data was ever allocated. This happens often so we have
@@ -180,7 +181,8 @@ internal_function
__free_tcb (struct pthread *pd)
{
/* The thread is exiting now. */
- if (atomic_bit_test_set (&pd->cancelhandling, TERMINATED_BIT) == 0)
+ if (__builtin_expect (atomic_bit_test_set (&pd->cancelhandling,
+ TERMINATED_BIT) == 0, 1))
{
/* Remove the descriptor from the list. */
if (DEBUGGING_P && __find_in_stack_list (pd) == NULL)