summaryrefslogtreecommitdiff
path: root/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp')
-rw-r--r--performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp b/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
index 2f82c87f56f..57a4c4170ac 100644
--- a/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
+++ b/performance-tests/Synch-Benchmarks/Base_Test/base_test.cpp
@@ -32,24 +32,32 @@ Baseline_Base_Test::release ()
int
Baseline_Base_Test::test_acquire_release ()
{
- baseline_options.start_inc_timer ();
-
for (; baseline_options.inc_loop_counter () ; )
- ;
+ {
+ this->yield ();
+ baseline_options.start_inc_timer ();
+
+ for (size_t i=0; i < baseline_options.current_multiply_factor (); i++)
+ ;
- baseline_options.stop_inc_timer ();
+ baseline_options.stop_inc_timer ();
+ }
return 0;
}
int
Baseline_Base_Test::test_try_lock ()
{
- baseline_options.start_inc_timer ();
-
for (; baseline_options.inc_loop_counter () ; )
- ;
+ {
+ this->yield ();
+ baseline_options.start_inc_timer ();
+
+ for (size_t i=0; i < baseline_options.current_multiply_factor (); i++)
+ ;
- baseline_options.stop_inc_timer ();
+ baseline_options.stop_inc_timer ();
+ }
return 0;
}