This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix lost wake-up when pthread_rwlock_timedrwlock times out.


On Wed, 22 Apr 2015, 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.

If this was a bug that was user-visible in a release, there should be a 
bug filed in Bugzilla for it and appropriate [BZ #N] used.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]