This is the mail archive of the
mailing list for the glibc project.
Re: why does rwlock prefer readers by default?
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Wed, 7 May 2014 13:25:36 +0200
- Subject: Re: why does rwlock prefer readers by default?
- Authentication-results: sourceware.org; auth=none
- References: <1399458831 dot 32485 dot 12625 dot camel at triegel dot csb>
On Wed, May 07, 2014 at 12:33:51PM +0200, Torvald Riegel wrote:
> POSIX makes it an implementation-defined choice whether readers or
> writers are preferred. Our current implementation's default is that
> readers are to be preferred. I couldn't find the rationale for this;
> does anybody know what it was?
> Otherwise, if this was an arbitrary choice, what do you all think the
> default should be? Can we change it? Should we change it to preferring
See archives, original thread was here
This was recently pinged in this thread.
A relevant part from Wang's mail is following: "
Cyril Hrubis once reported a bug about pthread_rwlock() posix tests in
And there were some clarification requests for Austin Group about this
According to the discussion results, it seems that write locks should be
implemented to take precedence before the read locks.