aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/CMakeLists.txt
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2020-11-12 16:08:46 +0000
committerHåvard Pettersen <havardpe@oath.com>2020-11-12 16:17:02 +0000
commitb6268ea791bc989679227facbf528cc98f096ff4 (patch)
tree352f5f32d524e0c08f40b5b9b4e04e09e6a8ef0a /vespalib/CMakeLists.txt
parent4470fe086ed38d22872c0e237eb61e19a5d52351 (diff)
added spin lock with test
The micro-benchmark shows promise (run test manually with 'verbose' as parameter). It indicates that taking and releasing the spin lock from a single thread is cheaper than doing the same with a normal mutex (as expected based on previous tests). However, it also indicates that it is competitive with a normal mutex for short critical sections with multiple threads involved. (on my laptop, only the cases using more threads than cores run faster with a normal mutex, which is a better result than expected).
Diffstat (limited to 'vespalib/CMakeLists.txt')
-rw-r--r--vespalib/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/vespalib/CMakeLists.txt b/vespalib/CMakeLists.txt
index 278d32c118d..dbcf2beadd8 100644
--- a/vespalib/CMakeLists.txt
+++ b/vespalib/CMakeLists.txt
@@ -100,6 +100,7 @@ vespa_define_module(
src/tests/slime
src/tests/slime/external_data_value
src/tests/slime/summary-feature-benchmark
+ src/tests/spin_lock
src/tests/stash
src/tests/stllike
src/tests/stringfmt