aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 18:12:39 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 18:33:14 +0000
commitcd94860c56f8a463b93f2d7ec0c588a0259884fc (patch)
tree7410bbcbf5497d9de144f5e61dc4e4a30ee9b705 /sysdeps/htl
parentdb12905d1db0d73d3399feaeb569119cefd24922 (diff)
downloadglibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.tar
glibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.tar.gz
glibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.tar.bz2
glibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.zip
htl: Report missing mutex lock on pthread_cond_*wait
Diffstat (limited to 'sysdeps/htl')
-rw-r--r--sysdeps/htl/pt-cond-timedwait.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/htl/pt-cond-timedwait.c b/sysdeps/htl/pt-cond-timedwait.c
index d9ce23b682..3a11e016d7 100644
--- a/sysdeps/htl/pt-cond-timedwait.c
+++ b/sysdeps/htl/pt-cond-timedwait.c
@@ -78,6 +78,10 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond,
if (abstime && ! valid_nanoseconds (abstime->tv_nsec))
return EINVAL;
+ err = __pthread_mutex_checklocked (mutex);
+ if (err)
+ return err;
+
struct __pthread *self = _pthread_self ();
struct cancel_ctx ctx;
ctx.wakeup = self;