summaryrefslogtreecommitdiff
path: root/tests/test-pthread-rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pthread-rwlock.c')
-rw-r--r--tests/test-pthread-rwlock.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test-pthread-rwlock.c b/tests/test-pthread-rwlock.c
index 7ab8d5ee..8a4ab93b 100644
--- a/tests/test-pthread-rwlock.c
+++ b/tests/test-pthread-rwlock.c
@@ -1,5 +1,5 @@
/* Test of read-write locks in multithreaded situations.
- Copyright (C) 2005, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,6 +16,15 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+/* This test fails when writer starvation occurs
+ <https://en.wikipedia.org/wiki/Readers%E2%80%93writers_problem>.
+ It depends on the implementation of pthread rwlocks, cf.
+ <https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=tree;f=test-programs/pthread-rwlock>,
+ 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 <config.h>
#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS