forked from bminor/glibc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nptl: pthread_rwlock: Move timeout validation into _full functions
As recommended by the comments in the implementations of pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock, let's move the timeout validity checks into the corresponding pthread_rwlock_rdlock_full and pthread_rwlock_wrlock_full functions. Since these functions may be called with abstime == NULL, an extra check for that is necessary too. * nptl/pthread_rwlock_common.c (__pthread_rwlock_rdlock_full): Check validity of abstime parameter. (__pthread_rwlock_rwlock_full): Likewise. * nptl/pthread_rwlock_timedrdlock.c * (pthread_rwlock_timedrdlock): Remove check for validity of abstime parameter. * nptl/pthread_rwlock_timedwrlock.c * (pthread_rwlock_timedwrlock): Likewise. Reviewed-by: Adhemerval Zanella <[email protected]>
- Loading branch information
Showing
4 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
2019-07-12 Mike Crowe <[email protected]> | ||
|
||
nptl: pthread_rwlock: Move timeout validation into _full functions | ||
* nptl/pthread_rwlock_common.c (__pthread_rwlock_rdlock_full): | ||
Check validity of abstime parameter. | ||
(__pthread_rwlock_rwlock_full): Likewise. | ||
* nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): | ||
Remove check for validity of abstime parameter. | ||
* nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): | ||
Likewise. | ||
|
||
nptl: Add POSIX-proposed pthread_cond_clockwait which behaves just | ||
like pthread_cond_timedwait except it always measures abstime | ||
against the supplied clockid. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters