[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 20 01:42:11 PDT 2025
================
@@ -1692,6 +1692,21 @@ class Target : public std::enable_shared_from_this<Target>,
}
};
+/// The private implementation backing SBLock.
+class APILock {
+public:
+ APILock(std::shared_ptr<std::recursive_mutex> mutex_sp)
+ : m_mutex(std::move(mutex_sp)), m_lock(*m_mutex) {}
+
+ void Unlock() { m_lock.unlock(); }
+
+ operator bool() const { return static_cast<bool>(m_lock); }
+
----------------
labath wrote:
What would you say to removing these, and having SBLock::Unlock do its work by clearing the unique_ptr ?
https://github.com/llvm/llvm-project/pull/131404
More information about the lldb-commits
mailing list