This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14958] Concurrent reader deadlock in pthread_rwlock_rdlock()
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 16 Dec 2012 17:33:15 +0000
- Subject: [Bug libc/14958] Concurrent reader deadlock in pthread_rwlock_rdlock()
- Auto-submitted: auto-generated
- References: <bug-14958-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14958
--- Comment #4 from Rich Felker <bugdal at aerifal dot cx> 2012-12-16 17:33:15 UTC ---
I don't necessarily believe it's impossible; just difficult. For example, the
unlocking thread wanting to wake a writer could set a flag in the rwlock
structure before unlocking indicating that intent. A writer, upon obtaining the
lock, could clear it. A reader, upon obtaining the lock, could inspect the
flag, and if nonzero, broadcast-wake readers and clear the flag. This algorithm
sounds roughly correct, but there may still be holes in it.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.