]> Savannah Git Hosting - gnulib.git/commit
pthread-rwlock: Fix default wait queue behaviour on glibc/Linux.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Aug 2024 17:53:37 +0000 (19:53 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 7 Aug 2024 17:53:37 +0000 (19:53 +0200)
commitf7576a33332e4bc63fc0b15801a82abe865304ca
tree621f073dd53446019a837c9a0cf36c94696abe11
parent6665274371e232134b8273d70d99c59da21d716f
pthread-rwlock: Fix default wait queue behaviour on glibc/Linux.

* lib/pthread.in.h: If REPLACE_PTHREAD_RWLOCK_INIT is 1 but
REPLACE_PTHREAD_RWLOCK_DESTROY is 0, override
PTHREAD_RWLOCK_INITIALIZER.
* lib/pthread-rwlock.c
(pthread_rwlockattr_init) [PTHREAD_RWLOCK_BAD_WAITQUEUE]: New function.
(pthread_rwlock_init) [PTHREAD_RWLOCK_BAD_WAITQUEUE]: New function.
* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Check for reasonable
pthread_rwlock wait queue handling. Set REPLACE_PTHREAD_RWLOCK_INIT and
REPLACE_PTHREAD_RWLOCKATTR_INIT and define PTHREAD_RWLOCK_BAD_WAITQUEUE
if not.
* modules/pthread-rwlock (configure.ac): Update
GL_COND_OBJ_PTHREAD_RWLOCK condition.
* doc/posix-functions/pthread_rwlock_rdlock.texi: Mark the glibc problem
as fixed.
* doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likewise.
* doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
ChangeLog
doc/posix-functions/pthread_rwlock_rdlock.texi
doc/posix-functions/pthread_rwlock_timedrdlock.texi
doc/posix-functions/pthread_rwlock_tryrdlock.texi
lib/pthread-rwlock.c
lib/pthread.in.h
m4/pthread-rwlock.m4
modules/pthread-rwlock