From: Carlos O'Donell Date: Thu, 16 Jul 2020 19:50:28 +0000 (-0400) Subject: pthread_rwlockattr_setkind_np.3: Clarify a PTHREAD_RWLOCK_PREFER_WRITER_NP detail X-Git-Tag: man-pages-5.08~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c47c61c3308d0ca88a583122459364967393d823;p=thirdparty%2Fman-pages.git pthread_rwlockattr_setkind_np.3: Clarify a PTHREAD_RWLOCK_PREFER_WRITER_NP detail Clarify that it is recursive read locks on the read-write lock that make it difficult to implement PTHREAD_RWLOCK_PREFER_WRITER_NP. Update the libc-alpha URL and provide the URL to the POSIX wording that is quoted in the comment. Reported-by: Kumar Kartikeya Dwivedi Signed-off-by: Carlos O'Donell Signed-off-by: Michael Kerrisk --- diff --git a/man3/pthread_rwlockattr_setkind_np.3 b/man3/pthread_rwlockattr_setkind_np.3 index b381972dc6..a91c435520 100644 --- a/man3/pthread_rwlockattr_setkind_np.3 +++ b/man3/pthread_rwlockattr_setkind_np.3 @@ -80,7 +80,7 @@ starved. This is intended as the write lock analog of .BR PTHREAD_RWLOCK_PREFER_READER_NP . This is ignored by glibc because the POSIX requirement to support -recursive writer locks would cause this option to create trivial +recursive read locks would cause this option to create trivial deadlocks; instead use .B PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP which ensures the application developer will not take recursive @@ -102,7 +102,8 @@ read locks thus avoiding deadlocks. .\" the writers to acquire and release the lock, and the writers will be .\" suspended waiting for every existing read lock to be released. .\" --- -.\" http://sources.redhat.com/ml/libc-alpha/2000-01/msg00055.html +.\" https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html +.\" https://sourceware.org/legacy-ml/libc-alpha/2000-01/msg00055.html .\" https://sourceware.org/bugzilla/show_bug.cgi?id=7057 .TP .B PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP