[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-pthread-rwlock failure on Pop!_OS 22.04 LTS
From: |
Bruno Haible |
Subject: |
Re: test-pthread-rwlock failure on Pop!_OS 22.04 LTS |
Date: |
Wed, 07 Aug 2024 19:56:04 +0200 |
On 2024-07-07, I stated:
> This provides enough justification for gnulib to override the glibc behaviour
> here. I will therefore go ahead and override
> PTHREAD_RWLOCK_INITIALIZER
> pthread_rwlock_init
> pthread_rwlock_attr_init
> to use PREFER_WRITER or PREFER_WRITER_NONRECURSIVE, which both behave in a
> sane way even in glibc ≥ 2.25.
Done through these two patches:
2024-08-07 Bruno Haible <bruno@clisp.org>
pthread-rwlock tests: Strengthen tests.
* tests/test-pthread-rwlock-waitqueue.c: New file.
* modules/pthread-rwlock-tests (Files): Add it.
(Depends-on): Add extensions, nanosleep, stdbool.
(Makefile.am): Arrange to test test-pthread-rwlock-waitqueue.
2024-08-07 Bruno Haible <bruno@clisp.org>
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.
0001-pthread-rwlock-Fix-default-wait-queue-behaviour-on-g.patch
Description: Text Data
0002-pthread-rwlock-tests-Strengthen-tests.patch
Description: Text Data
- Re: test-pthread-rwlock failure on Pop!_OS 22.04 LTS,
Bruno Haible <=