aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/signalhandler/my_shared_library.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/signalhandler/my_shared_library.cpp')
-rw-r--r--vespalib/src/tests/signalhandler/my_shared_library.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/vespalib/src/tests/signalhandler/my_shared_library.cpp b/vespalib/src/tests/signalhandler/my_shared_library.cpp
index 4b7593d863c..97c03208213 100644
--- a/vespalib/src/tests/signalhandler/my_shared_library.cpp
+++ b/vespalib/src/tests/signalhandler/my_shared_library.cpp
@@ -8,10 +8,12 @@
// Could have used a single std::barrier<no op functor> here, but when using explicit
// phase latches it sort of feels like the semantics are more immediately obvious.
-void my_cool_function(std::latch& arrival_latch, std::latch& departure_latch) {
- arrival_latch.arrive_and_wait();
+void my_cool_function(vespalib::CountDownLatch& arrival_latch, vespalib::CountDownLatch& departure_latch) {
+ arrival_latch.countDown();
+ arrival_latch.await();
// Twiddle thumbs in departure latch until main test thread has dumped our stack
- departure_latch.arrive_and_wait();
+ departure_latch.countDown();
+ departure_latch.await();
asm(""); // Dear GCC; really, really don't inline this function. It's clobberin' time!
}