summaryrefslogtreecommitdiff
path: root/test/testatomic.c
diff options
context:
space:
mode:
authorbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-09-22 03:47:01 +0000
committerbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-09-22 03:47:01 +0000
commit26b9604114654ac5942a796838d50b53d20c66c1 (patch)
tree36667dae05df1debfe9cd46b9ab0ecf2bc0c63dc /test/testatomic.c
parentd2bd14533769445c7d03d1d3e3d0d28f8cceb45e (diff)
downloadlibapr-26b9604114654ac5942a796838d50b53d20c66c1.tar.gz
Test all of the atomic math operations in the multithreaded
phase of the tests git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testatomic.c')
-rw-r--r--test/testatomic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index 84e82fb23..cbd36344d 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -213,7 +213,10 @@ void * APR_THREAD_FUNC thread_func_atomic(apr_thread_t *thd, void *data)
apr_thread_once(control, init_func);
for (i = 0; i < NUM_ITERATIONS ; i++) {
- apr_atomic_inc( &y );
+ apr_atomic_inc(&y);
+ apr_atomic_add(&y, 2);
+ apr_atomic_dec(&y);
+ apr_atomic_dec(&y);
}
apr_thread_exit(thd, exit_ret_val);
return NULL;