[PATCH] Fix lost wake-up when pthread_rwlock_timedrwlock times out.
Siddhesh Poyarekar
siddhesh@redhat.com
Thu Jun 4 07:44:00 GMT 2015
On Wed, Apr 22, 2015 at 05:06:49PM +0200, Torvald Riegel wrote:
> If we set up a rwlock to prefer writers (and disallow recursive rdlock
> acquisitions), then readers will block for writers that are blocked to
> acquire the lock (otherwise, readers could constantly enter and exit,
> and the writer would never get the lock). However, the existing
> implementation did not wake such readers when the writer timed out.
> This patch adds the missing wake-up.
> There's no similar case for writers being blocked on readers.
>
> Tested on x86_64-linux. OK?
>
> 2015-04-22 Torvald Riegel <triegel@redhat.com>
>
> * nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Add
> missing wake-up of readers.
> * nptl/tst-rwlock15.c: New file.
> * nptl/Makefile (tests): Add new test.
>
Looks good to me.
Thanks,
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150604/7a9e3ebc/attachment.sig>
More information about the Libc-alpha
mailing list