From: Bruno Haible Date: Fri, 16 May 2025 13:09:09 +0000 (+0200) Subject: pthread-rwlock tests: Add a comment. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5111011429efd433cc0641a45ad4b7206592946;p=thirdparty%2Fgnulib.git pthread-rwlock tests: Add a comment. Reported by Natanael Copa in . * tests/test-pthread-rwlock.c: Explain why this test can fail. --- diff --git a/ChangeLog b/ChangeLog index 371af7fada..95323c3a19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-05-16 Bruno Haible + + pthread-rwlock tests: Add a comment. + Reported by Natanael Copa in + . + * tests/test-pthread-rwlock.c: Explain why this test can fail. + 2025-05-14 Bruno Haible asyncsafe-spin: Rely on module 'spin'. diff --git a/tests/test-pthread-rwlock.c b/tests/test-pthread-rwlock.c index 90d6ac5017..8a4ab93b41 100644 --- a/tests/test-pthread-rwlock.c +++ b/tests/test-pthread-rwlock.c @@ -16,6 +16,15 @@ /* Written by Bruno Haible , 2005. */ +/* This test fails when writer starvation occurs + . + It depends on the implementation of pthread rwlocks, cf. + , + as well as on the number of CPUs (because when there are >= 2*THREAD_COUNT + CPUs, the checker threads are more "efficient" at not giving away the + reader lock). + A failure was seen with musl libc/riscv64 on a machine with 64 CPUs. */ + #include #if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS