diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-06-27 19:32:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-06-27 19:32:01 +0000 |
commit | 46f4c5787ad7e3940d3cfb67320e70cff2fbe032 (patch) | |
tree | 60dc12e3495ac8e19ac67f3390f635d06662b81d /nptl/sysdeps | |
parent | 17fb9c535b4e4fb35017a8478a8b274481e3d57e (diff) | |
download | glibc-46f4c5787ad7e3940d3cfb67320e70cff2fbe032.zip glibc-46f4c5787ad7e3940d3cfb67320e70cff2fbe032.tar.gz glibc-46f4c5787ad7e3940d3cfb67320e70cff2fbe032.tar.bz2 |
Update.
2004-06-27 Ulrich Drepper <drepper@redhat.com>
* Makefile: Add rules to build tst-rwlock14.
* tst-rwlock14.c: New file.
2004-06-24 Boris Hu <boris.hu@intel.com>
* sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
check.
* sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c | 3 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c index 2cba0d3..85cc176 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c @@ -70,7 +70,8 @@ pthread_rwlock_timedrdlock (rwlock, abstime) performed if we would not block at all simply moving the test to the front is no option. Replicating all the code is costly while this test is not. */ - if (__builtin_expect (abstime->tv_nsec >= 1000000000, 0)) + if (__builtin_expect (abstime->tv_nsec >= 1000000000 + || abstime->tv_sec < 0, 0)) { result = EINVAL; break; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c index a3cdda3..dd5f9b4 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c @@ -61,7 +61,8 @@ pthread_rwlock_timedwrlock (rwlock, abstime) performed if we would not block at all simply moving the test to the front is no option. Replicating all the code is costly while this test is not. */ - if (abstime->tv_nsec >= 1000000000) + if (__builtin_expect (abstime->tv_nsec >= 1000000000 + || abstime->tv_sec < 0, 0)) { result = EINVAL; break; |