This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/7057] pthread rwlock does not implement 'writer preferred' option
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 15 Nov 2018 09:29:22 +0000
- Subject: [Bug nptl/7057] pthread rwlock does not implement 'writer preferred' option
- Auto-submitted: auto-generated
- References: <bug-7057-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=7057
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Steven Munroe from comment #2)
> Uli I think this question deserves a more complete explanation.
>
> This seems like a reasonable request. If you disagree then it would not hurt
> to explain why.
>
> There seems to be a valid concern related to reliable implementation of
> recursive read locks with writer priority. As in this discusion:
>
> http://sources.redhat.com/ml/libc-alpha/2000-01/msg00055.html
>
> If this your concern then saying so would help resolve/close this issue.
I'm making a statement here that this is exactly the case.
Adding support for PTHREAD_RWLOCK_PREFER_WRITER_NP is not possible without
serious negative consequences.
It is not a bug, it is simply a conflicting requirement between
PTHREAD_RWLOCK_PREFER_WRITER_NP (a non-portable extension) and POSIX that
cannot be satisfied without significant difficulty, and because of that we
don't support PTHREAD_RWLOCK_PREFER_WRITER_NP (but can't get rid of it for ABI
reasons), instead we have an additional constant
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP which ensures the readers are
non-recursive and thus writer preference can be implemented without the obvious
deadlock.
I am rewriting the Linux man-pages document to state this, which was the
decision made on the mailing list but was never followed up.
--
You are receiving this mail because:
You are on the CC list for the bug.