aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2023-04-05 13:06:13 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2023-04-05 15:38:35 +0300
commit58199ecff33175f95ab32e77851d11320ac7e84a (patch)
tree2650128662514ddc93f98a79ac0e659a12234f21 /test
parent207209793df5a79cd6dc4fb2ee1b542719f30502 (diff)
test: atomic_perf: increase init value
Quick fix to enable more rounds in min tests. The same value is used for 32 and 64 bit tests. Initialize it to half way of 32 bit range, so that both min and max tests support 2 billion modifications before the value saturates. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Diffstat (limited to 'test')
-rw-r--r--test/performance/odp_atomic_perf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/performance/odp_atomic_perf.c b/test/performance/odp_atomic_perf.c
index ee760babf..5eeba8442 100644
--- a/test/performance/odp_atomic_perf.c
+++ b/test/performance/odp_atomic_perf.c
@@ -18,8 +18,9 @@
/* Default number of test rounds */
#define NUM_ROUNDS 1000000u
-/* Initial value for atomic variables */
-#define INIT_VAL 1234567
+/* Initial value for atomic variables. Supports up to 2 billion
+ * rounds of 32-bit min and max tests. */
+#define INIT_VAL 0x80000000
/* Max number of workers if num_cpu=0 */
#define DEFAULT_MAX_WORKERS 10