aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBMutex.cpp9
-rw-r--r--lldb/source/API/SBPlatform.cpp5
2 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/API/SBMutex.cpp b/lldb/source/API/SBMutex.cpp
index 445076b..c7844de 100644
--- a/lldb/source/API/SBMutex.cpp
+++ b/lldb/source/API/SBMutex.cpp
@@ -58,3 +58,12 @@ void SBMutex::unlock() const {
if (m_opaque_sp)
m_opaque_sp->unlock();
}
+
+bool SBMutex::try_lock() const {
+ LLDB_INSTRUMENT_VA(this);
+
+ if (m_opaque_sp)
+ return m_opaque_sp->try_lock();
+
+ return false;
+}
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp
index ec59e27..9a0b47c 100644
--- a/lldb/source/API/SBPlatform.cpp
+++ b/lldb/source/API/SBPlatform.cpp
@@ -331,6 +331,11 @@ SBPlatform::operator bool() const {
return m_opaque_sp.get() != nullptr;
}
+bool SBPlatform::IsHost() const {
+ LLDB_INSTRUMENT_VA(this);
+ return m_opaque_sp.get() != nullptr && m_opaque_sp->IsHost();
+}
+
void SBPlatform::Clear() {
LLDB_INSTRUMENT_VA(this);