summaryrefslogtreecommitdiff
path: root/test/testatomic.c
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2004-03-13 01:50:58 +0000
committerRyan Bloom <rbb@apache.org>2004-03-13 01:50:58 +0000
commit7c23f8bff61ed6ff98da2341cb5c698cbc65c4f9 (patch)
tree5efbe318fb16f7fe0ea110dd174869b8f880b507 /test/testatomic.c
parentc6465c4b35cc7d4afce6f30a5eeaf8e75cb278d4 (diff)
downloadapr-7c23f8bff61ed6ff98da2341cb5c698cbc65c4f9.tar.gz
No reason to keep track of the old return values.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64975 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testatomic.c')
-rw-r--r--test/testatomic.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index b92baae51..3c5c3af29 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -231,9 +231,6 @@ static void test_atomics_threaded(CuTest *tc)
apr_thread_t *t1[NUM_THREADS];
apr_thread_t *t2[NUM_THREADS];
apr_thread_t *t3[NUM_THREADS];
- apr_status_t r1[NUM_THREADS];
- apr_status_t r2[NUM_THREADS];
- apr_status_t r3[NUM_THREADS];
apr_status_t s1[NUM_THREADS];
apr_status_t s2[NUM_THREADS];
apr_status_t s3[NUM_THREADS];
@@ -248,18 +245,21 @@ static void test_atomics_threaded(CuTest *tc)
apr_assert_success(tc, "Could not create lock", rv);
for (i = 0; i < NUM_THREADS; i++) {
- r1[i] = apr_thread_create(&t1[i], NULL, thread_func_mutex, NULL, p);
- r2[i] = apr_thread_create(&t2[i], NULL, thread_func_atomic, NULL, p);
- r3[i] = apr_thread_create(&t3[i], NULL, thread_func_none, NULL, p);
+ apr_status_t r1, r2, r3;
+ r1 = apr_thread_create(&t1[i], NULL, thread_func_mutex, NULL, p);
+ r2 = apr_thread_create(&t2[i], NULL, thread_func_atomic, NULL, p);
+ r3 = apr_thread_create(&t3[i], NULL, thread_func_none, NULL, p);
CuAssert(tc, "Failed creating threads",
- r1[i] == APR_SUCCESS && r2[i] == APR_SUCCESS &&
- r3[i] == APR_SUCCESS);
+ r1 == APR_SUCCESS && r2 == APR_SUCCESS &&
+ r3 == APR_SUCCESS);
}
for (i = 0; i < NUM_THREADS; i++) {
+ char *str;
apr_thread_join(&s1[i], t1[i]);
apr_thread_join(&s2[i], t2[i]);
apr_thread_join(&s3[i], t3[i]);
+
CuAssert(tc, "Invalid return value from thread_join",
s1[i] == exit_ret_val && s2[i] == exit_ret_val &&
s3[i] == exit_ret_val);