[PATCH] Fix missing wake-ups in pthread_rwlock_rdlock.
Torvald Riegel
triegel@redhat.com
Wed May 13 09:11:00 GMT 2015
Ping.
On Wed, 2015-04-29 at 18:25 +0200, Torvald Riegel wrote:
> This adds wake-ups that would be missing if assuming that for a
> non-writer-preferring rwlock, if one thread has acquired a rdlock and
> does not release it, another thread will eventually acquire a rdlock too
> despite concurrent write lock acquisition attempts. BZ 14958 is about
> supporting this assumption.
>
> I've commented on the BZ why I think that strictly speaking, this isn't
> a valid test case, but nonetheless worth supporting:
> https://sourceware.org/bugzilla/show_bug.cgi?id=14958#c7
>
> I have no intention to work on supporting the requirements about Thread
> Execution Scheduling and priorities for pthread_rwlock_rdlock (see BZ
> 13701); we claim to support it, so with this patch, we can claim that we
> assume assume the priorities to all be equal (in which case readers are
> to be preferred). See
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html
>
> Tested on x86_64-linux. (Applies on top of the other rwlock fix I sent.)
> OK?
>
> 2015-04-28 Torvald Riegel <triegel@redhat.com>
>
> [BZ #14958]
> * nptl/pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add missing
> wake-up.
> (__pthread_rwlock_rdlock_slow): Likewise.
> * nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
> Likewise.
> * nptl/pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock):
> Likewise.
> * nptl/pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Add comments.
> * nptl/tst-rwlock16.c: New file.
> * nptl/Makefile (tests): Add new test.
More information about the Libc-alpha
mailing list