aboutsummaryrefslogtreecommitdiff
path: root/nptl/old_pthread_cond_timedwait.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-02-22 12:10:26 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-05-14 08:44:03 -0300
commit959aff9fa22c45e0fa11cd88c9f8ea10bd9ba494 (patch)
treee5b227f07c74b644e8b2d71a9186b1f9ea79baab /nptl/old_pthread_cond_timedwait.c
parentd7e4c642ef13933361c276df87c52e83b2c212a2 (diff)
downloadglibc-959aff9fa22c45e0fa11cd88c9f8ea10bd9ba494.tar
glibc-959aff9fa22c45e0fa11cd88c9f8ea10bd9ba494.tar.gz
glibc-959aff9fa22c45e0fa11cd88c9f8ea10bd9ba494.tar.bz2
glibc-959aff9fa22c45e0fa11cd88c9f8ea10bd9ba494.zip
Assume LLL_LOCK_INITIALIZER is 0
Since hppa is not an outlier anymore regarding LLL_LOCK_INITIALIZER value, we can now assume it 0 for all architectures. Checked on a build for all major ABIs. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Remove initialization for LLL_LOCK_INITIALIZER different than 0. * nptl/old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Assume LLL_LOCK_INITIALIZER being 0. * nptl/old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise. * nptl/old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0): Likewise. * nptl/old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise. * sysdeps/nptl/libc-lockP.h (__libc_lock_define_initialized): Likewise.
Diffstat (limited to 'nptl/old_pthread_cond_timedwait.c')
-rw-r--r--nptl/old_pthread_cond_timedwait.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/nptl/old_pthread_cond_timedwait.c b/nptl/old_pthread_cond_timedwait.c
index f920320b13..a1fde85825 100644
--- a/nptl/old_pthread_cond_timedwait.c
+++ b/nptl/old_pthread_cond_timedwait.c
@@ -32,18 +32,9 @@ __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex,
{
pthread_cond_t *newcond;
-#if LLL_LOCK_INITIALIZER == 0
newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1);
if (newcond == NULL)
return ENOMEM;
-#else
- newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t));
- if (newcond == NULL)
- return ENOMEM;
-
- /* Initialize the condvar. */
- (void) pthread_cond_init (newcond, NULL);
-#endif
if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL))
/* Somebody else just initialized the condvar. */