]> 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>
Mon, 12 Aug 2024 17:15:14 +0000 (19:15 +0200)
commit6001bdfe1a67cb483b8f023e793cb8bf7813c553
treef259c9a0ce8f8aca644ae41f4e505eede253428d
parent43de290147853cda960ca2b3f52e07009cf21b0f
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.
ChangeLog
lib/pthread-rwlock.c
lib/pthread.in.h
m4/pthread-rwlock.m4
modules/pthread-rwlock