diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
commit | 27dae84ed92f1ef0300263091972338d12e78348 (patch) | |
tree | 7c52931f474fafb8a4bd4fd15ca3461c77cdecc2 /tests/test-pthread-rwlock.c | |
parent | 4682deeb62247d34de87f8e777f99e2d337fd377 (diff) |
New upstream version 1.4.1upstream/1.4.1upstream
Diffstat (limited to 'tests/test-pthread-rwlock.c')
-rw-r--r-- | tests/test-pthread-rwlock.c | 11 |
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 |