From 09a0041f2072fa520cb7e9f47e90b4d4687efe53 Mon Sep 17 00:00:00 2001 From: Hayodea Hakol Date: Mon, 22 Sep 2025 21:29:43 -0400 Subject: [PATCH] Squash: into debug locks intro commit --- .../serializedAsynchronousContinuation.cpp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 smocore/serializedAsynchronousContinuation.cpp diff --git a/smocore/serializedAsynchronousContinuation.cpp b/smocore/serializedAsynchronousContinuation.cpp new file mode 100644 index 0000000..a5e4f56 --- /dev/null +++ b/smocore/serializedAsynchronousContinuation.cpp @@ -0,0 +1,30 @@ +#include +#include +#include + +namespace smo { + +#ifdef CONFIG_ENABLE_DEBUG_LOCKS +template +template +void +SerializedAsynchronousContinuation +::LockerAndInvoker +::handleLikelyDeadlock(Qutex& firstFailedQutex) +{ + std::cerr << __func__ << ": Deadlock likely: " + << "Lockvoker has been waiting for " + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - this->creationTimestamp) + .count() + << "ms, failed on qutex @" << &firstFailedQutex + << " (" << firstFailedQutex.name << ")" << std::endl; + + +} +#endif + +// Explicit template instantiations for the types we need +// Add more as needed for your specific use cases + +} // namespace smo