summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2023-02-15 12:49:04 +0000
committerYann Ylavic <ylavic@apache.org>2023-02-15 12:49:04 +0000
commitff8a0da8f6944629eaef0d2030ac473fdace8a0b (patch)
tree25e7d394d948070b5f408ae9b3fb0e54b285e273
parentf0fd0f04ce331c7b13d0541b94c9b941c5dfd6da (diff)
downloadapr-ff8a0da8f6944629eaef0d2030ac473fdace8a0b.tar.gz
testatomic: initialize in the test the globals used by it.
Just in case the test is later reordered (e.g. test_atomics_threaded64 and test_atomics_threaded_setread64 use the same atomic_ops64 variable). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907677 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testatomic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index a6df04262..4571faa76 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -662,6 +662,9 @@ static void test_atomics_threaded64(abts_case *tc, void *data)
pthread_setconcurrency(8);
#endif
+ mutex_locks64 = 0;
+ apr_atomic_set64(&atomic_ops64, 0);
+
rv = apr_thread_mutex_create(&thread_lock64, APR_THREAD_MUTEX_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "Could not create lock", rv);