diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-03-15 07:52:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-03-15 07:52:41 +0000 |
commit | 04366d5f822a135bec38390bd96db367ebd0931a (patch) | |
tree | 6ebc6e3959b4d0ac659923140b8331876a7b628b /linuxthreads | |
parent | 5d1415976fb392aac199c42a47bf453a86286da5 (diff) | |
download | glibc-04366d5f822a135bec38390bd96db367ebd0931a.tar.gz glibc-04366d5f822a135bec38390bd96db367ebd0931a.tar.xz glibc-04366d5f822a135bec38390bd96db367ebd0931a.zip |
Update.
2000-03-14 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/alpha/ioperm.c (platform): Add entry for Nautilus. Patch by Soohoon Lee <soohoon.lee@alpha-processor.com>.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 3 | ||||
-rw-r--r-- | linuxthreads/condvar.c | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 725653b02c..d600f27c39 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -2,7 +2,8 @@ * condvar.c (pthread_cond_wait): Check whether mutex is owned by current thread and return error if not. - (pthread_cond_timedwait): Likewise. + (pthread_cond_timedwait_relative_old): Likewise. + (pthread_cond_timedwait_relative_new): Likewise. * mutex.c (__pthread_once): Handle cancelled init function correctly. (pthread_once_cancelhandler): New function. diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c index d1e91d228c..023e5c6884 100644 --- a/linuxthreads/condvar.c +++ b/linuxthreads/condvar.c @@ -143,6 +143,10 @@ pthread_cond_timedwait_relative_old(pthread_cond_t *cond, sigjmp_buf jmpbuf; pthread_extricate_if extr; + /* Check whether the mutex is locked and owned by this thread. */ + if (mutex->__m_owner != self) + return EINVAL; + /* Set up extrication interface */ extr.pu_object = cond; extr.pu_extricate_func = cond_extricate_func; @@ -270,6 +274,10 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond, sigjmp_buf jmpbuf; pthread_extricate_if extr; + /* Check whether the mutex is locked and owned by this thread. */ + if (mutex->__m_owner != self) + return EINVAL; + already_canceled = 0; was_signalled = 0; @@ -384,10 +392,6 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond, int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec * abstime) { - /* Check whether the mutex is locked and owned by this thread. */ - if (mutex->__m_owner != self) - return EINVAL; - /* Indirect call through pointer! */ return pthread_cond_tw_rel(cond, mutex, abstime); } |