Linux-man Archive on
 help / color / Atom feed
* Re: POSIX writer locks can't be recursive
       [not found] <>
@ 2020-06-26  8:54 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2020-06-26  8:54 UTC (permalink / raw)
  To: Kumar Kartikeya Dwivedi; +Cc: mtk.manpages, Carlos O'Donell, linux-man

Hi Carlos,

Could you comment here, as this was your text in pthread_rwlockattr_setkind_np(3)?

On 6/25/20 2:32 PM, Kumar Kartikeya Dwivedi wrote:
> Hi,
> In pthread_rwlockattr_setkind_np(3), the explanation for
>> This is ignored by glibc because the POSIX requirement to support
>> recursive writer locks would cause this option to create trivial
>> deadlocks;
> I think this should be "reader locks" instead, since it is
> undefined[1] for a thread holding a write lock to call
> pthread_rwlock_wrlock(3) again (glibc returns EDEADLK, musl simply
> deadlocks). There's no such requirement in POSIX either. Please let me
> know if I'm missing something.
> [1]:



Michael Kerrisk
Linux man-pages maintainer;
Linux/UNIX System Programming Training:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-06-26  8:54 ` POSIX writer locks can't be recursive Michael Kerrisk (man-pages)

Linux-man Archive on

Archives are clonable:
	git clone --mirror linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ \
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone