summaryrefslogtreecommitdiff
path: root/tests/test-pthread-rwlock.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-10-18 19:07:08 +0200
committerJörg Frings-Fürst <debian@jff.email>2025-10-18 19:07:08 +0200
commit693ae7b71dfdd1a8146266b5794a71c0dbe5dff0 (patch)
tree9704e2f7bd8962ea8911cd6f4e2d37227d7eff2e /tests/test-pthread-rwlock.c
parentb8b9b0ac61ac47dddc58717f23619f8b06640498 (diff)
parent27dae84ed92f1ef0300263091972338d12e78348 (diff)
Update upstream source from tag 'upstream/1.4.1'
Update to upstream version '1.4.1' with Debian dir 8add41ffbfe3e6636eec0ec134c5af96832cc143
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