[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 27 15:25:32 PDT 2025
================
@@ -1692,6 +1692,22 @@ 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 Lock() { m_lock.lock(); }
+ void Unlock() { m_lock.unlock(); }
+
+ operator bool() const { return static_cast<bool>(m_lock); }
+
+private:
+ std::shared_ptr<std::recursive_mutex> m_mutex;
+ std::unique_lock<std::recursive_mutex> m_lock;
+};
+
----------------
bulbazord wrote:
This shouldn't be necessary anymore right?
https://github.com/llvm/llvm-project/pull/133295
More information about the lldb-commits
mailing list