summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-02-08 10:37:29 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-02-08 14:49:17 +0300
commit91b7cfa7d2c6b799cf84440690293f353a63f139 (patch)
treeba2aa103edd8c3ffa475b87a191c5b3ad6623444
parent223f00001b20337f6363f92db3a7b2fb29a6308c (diff)
downloadlibatomic_ops-91b7cfa7d2c6b799cf84440690293f353a63f139.tar.gz
Print message of almost-lock-free implementation in test_stack if used
* tests/test_stack.c [AO_USE_ALMOST_LOCK_FREE] (main): Print a message that almost-lock-free implementation is used.
-rw-r--r--tests/test_stack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_stack.c b/tests/test_stack.c
index efe59e1..17b2843 100644
--- a/tests/test_stack.c
+++ b/tests/test_stack.c
@@ -241,7 +241,10 @@ int main(int argc, char **argv)
fprintf(stderr, "Usage: %s [max # of threads]\n", argv[0]);
exit(1);
}
- for (exper_n = 0; exper_n < N_EXPERIMENTS; ++ exper_n)
+# ifdef AO_USE_ALMOST_LOCK_FREE
+ printf("Use almost-lock-free implementation\n");
+# endif
+ for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n)
for (nthreads = 1; nthreads <= max_nthreads; ++nthreads)
{
unsigned i;