]> Savannah Git Hosting - gnulib.git/commitdiff
pthread-rwlock: Attempt to avoid test failure on some machines.
authorBruno Haible <bruno@clisp.org>
Fri, 9 Aug 2024 09:59:10 +0000 (11:59 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 9 Aug 2024 09:59:10 +0000 (11:59 +0200)
Reported by Pádraig Brady <P@draigBrady.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00050.html>.

* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the
minimum interval to 10 ms.
* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.

ChangeLog
m4/pthread-rwlock.m4
tests/test-pthread-rwlock-waitqueue.c

index 38802e887d96bac1643fbdbdd3aa2ac6f9c20a21..c31e68d8ee67c9f49e80dfba40c7c241965e256a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-09  Bruno Haible  <bruno@clisp.org>
+
+       pthread-rwlock: Attempt to avoid test failure on some machines.
+       Reported by Pádraig Brady <P@draigBrady.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00050.html>.
+       * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the
+       minimum interval to 10 ms.
+       * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.
+
 2024-08-08  Bruno Haible  <bruno@clisp.org>
 
        doc: Update for other functions added in POSIX:2024.
index cbd08790e1d9cf217ce74e4fc14c8b9b42e8b60e..0e203606a124245a2ca9a5679567e85da3726c62 100644 (file)
@@ -1,5 +1,5 @@
 # pthread-rwlock.m4
-# serial 6
+# serial 7
 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -127,10 +127,8 @@ AC_DEFUN([gl_PTHREAD_RWLOCK],
 
 #if defined __hppa
 # define STEP_INTERVAL 20000000 /* nanoseconds */
-#elif defined __aarch64__ || defined __m68k__
-# define STEP_INTERVAL 10000000 /* nanoseconds */
 #else
-# define STEP_INTERVAL 5000000 /* nanoseconds */
+# define STEP_INTERVAL 10000000 /* nanoseconds */
 #endif
 
 static pthread_rwlock_t lock;
index 9dc4a4e80850668d52f3e074da83f3b2fc93b51e..b7df033c9043a43daeb0d328577d45fcedc2a1ff 100644 (file)
 #elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __linux__ && defined __hppa)
 /* FreeBSD, Linux/hppa */
 # define STEP_INTERVAL 20000000 /* nanoseconds */
-#elif defined __GNU__ || defined __sun || (defined __linux__ && (defined __aarch64__ || defined __m68k__))
-/* GNU/Hurd, Solaris, Linux/arm64, Linux/m68k */
-# define STEP_INTERVAL 10000000 /* nanoseconds */
 #else
-# define STEP_INTERVAL 5000000 /* nanoseconds */
+# define STEP_INTERVAL 10000000 /* nanoseconds */
 #endif
 
 static pthread_rwlock_t lock;