summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2023-02-15 12:49:04 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2023-02-15 12:49:04 +0000
commit09eecf0e7c12500c16d0a5c5d6b5ee05dbc3c2d7 (patch)
tree25e7d394d948070b5f408ae9b3fb0e54b285e273
parenta99be1501f7bac8c99af23bd5b43d2a09b519b71 (diff)
downloadlibapr-09eecf0e7c12500c16d0a5c5d6b5ee05dbc3c2d7.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);