diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-15 12:49:04 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-15 12:49:04 +0000 |
commit | 09eecf0e7c12500c16d0a5c5d6b5ee05dbc3c2d7 (patch) | |
tree | 25e7d394d948070b5f408ae9b3fb0e54b285e273 /test/testatomic.c | |
parent | a99be1501f7bac8c99af23bd5b43d2a09b519b71 (diff) | |
download | libapr-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
Diffstat (limited to 'test/testatomic.c')
-rw-r--r-- | test/testatomic.c | 3 |
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); |