diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-09 18:12:39 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-09 18:33:14 +0000 |
commit | cd94860c56f8a463b93f2d7ec0c588a0259884fc (patch) | |
tree | 7410bbcbf5497d9de144f5e61dc4e4a30ee9b705 /sysdeps/htl | |
parent | db12905d1db0d73d3399feaeb569119cefd24922 (diff) | |
download | glibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.tar.gz glibc-cd94860c56f8a463b93f2d7ec0c588a0259884fc.tar.xz 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.c | 4 |
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; |