1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00
Files
gnulib/modules/pthread-rwlock
Bruno Haible f7576a3333 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.
2024-08-07 19:53:37 +02:00

36 lines
850 B
Plaintext

Description:
POSIX read-write locks.
Files:
lib/pthread-rwlock.c
m4/pthread-rwlock.m4
Depends-on:
pthread-h
pthread-cond [test $gl_threads_api != windows && test $REPLACE_PTHREAD_RWLOCK_INIT = 1]
nanosleep [test $gl_threads_api != windows && test $HAVE_PTHREAD_RWLOCK_INIT = 1 && test $HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = 0]
windows-timedrwlock [test $gl_threads_api = windows]
configure.ac:
gl_PTHREAD_RWLOCK
gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_RWLOCK],
[test $REPLACE_PTHREAD_RWLOCK_INIT = 1 || test $HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = 0 || test $REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = 1])
gl_PTHREAD_MODULE_INDICATOR([pthread-rwlock])
Makefile.am:
if GL_COND_OBJ_PTHREAD_RWLOCK
lib_SOURCES += pthread-rwlock.c
endif
Include:
<pthread.h>
Link:
$(LIBPTHREAD) or $(LIBPMULTITHREAD)
License:
LGPLv2+
Maintainer:
all