summaryrefslogtreecommitdiff
path: root/nptl/pthread_mutex_timedlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_mutex_timedlock.c')
-rw-r--r--nptl/pthread_mutex_timedlock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index f0fb03e90b..07f0901e52 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -41,9 +41,8 @@
#endif
int
-pthread_mutex_timedlock (mutex, abstime)
- pthread_mutex_t *mutex;
- const struct timespec *abstime;
+pthread_mutex_timedlock (pthread_mutex_t *mutex,
+ const struct timespec *abstime)
{
int oldval;
pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
@@ -90,7 +89,8 @@ pthread_mutex_timedlock (mutex, abstime)
if (__glibc_unlikely (mutex->__data.__owner == id))
return EDEADLK;
- /* FALLTHROUGH */
+ /* Don't do lock elision on an error checking mutex. */
+ goto simple;
case PTHREAD_MUTEX_TIMED_NP:
FORCE_ELISION (mutex, goto elision);