mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Subject: Re: [musl] Simple question regarding read-write locks precedence
Date: Tue, 31 Mar 2020 13:37:24 -0400	[thread overview]
Message-ID: <20200331173724.GW11469@brightrain.aerifal.cx> (raw)
In-Reply-To: <20200331172120.GA2683@voyager>

On Tue, Mar 31, 2020 at 07:21:20PM +0200, Markus Wichmann wrote:
> On Tue, Mar 31, 2020 at 11:26:46AM -0400, Rich Felker wrote:
> > Thanks. While I specifically did not implement (or define a macro for)
> > PTHREAD_RWLOCK_PREFER_WRITER_NP because it's misleading to advertise
> > support for it when it fundamentally can't work,
> > PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP seems like a viable
> > extension to support. Anyone else see potential problems supporting it
> > that I might be missing?
> >
> > Rich
> 
> I do see one problem: The manpage (the only spec available) contradicts
> itself. In the Description section, it says (of the new option):
> 
> |Setting the lock kind to this avoids writer starvation as long as any
> |read locking is not done in a recursive fashion.
> 
> OK, but in the Bugs section:
> 
> |Setting the lock kind to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
> |allows writers to run, but, as the name implies a writer may not lock
> |recursively.
> 
> Well, which is it? Are writers or readers not supposed to recurse? I
> thought writers aren't supposed to recurse, anyway. Or is it possible we
> need to file a bug report to Michael Kerrisk? Maybe it was supposed to
> say "reader" here, then it would make sense. As it stands, though, the
> spec is unclear.

I think that's pretty clearly just a mistake in the man page that
should be reported. CC'ing.

Rich

  reply	other threads:[~2020-03-31 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 15:05 Koen Vandeputte
2020-03-31 15:09 ` Rich Felker
2020-03-31 15:21   ` Koen Vandeputte
2020-03-31 15:26     ` Rich Felker
2020-03-31 17:21       ` Markus Wichmann
2020-03-31 17:37         ` Rich Felker [this message]
2020-03-31 18:38           ` Markus Wichmann
2020-03-31 19:02             ` Michael Kerrisk (man-pages)
2020-03-31 19:45               ` Markus Wichmann
2020-03-31 20:15                 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200331173724.GW11469@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=mtk.manpages@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).