diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreter.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 6bc6cd0d2ad..0e85902cff2 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -81,6 +81,12 @@ ScriptInterpreter::LanguageToString (lldb::ScriptLanguage language) return return_value; } +std::auto_ptr<ScriptInterpreterLocker> +ScriptInterpreter::AcquireInterpreterLock () +{ + return std::auto_ptr<ScriptInterpreterLocker>(new ScriptInterpreterLocker()); +} + void ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_callback) { diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 5a97107ac10..68e984c1e6b 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -135,6 +135,7 @@ ScriptInterpreterPython::Locker::Locker (ScriptInterpreterPython *py_interpreter uint16_t on_entry, uint16_t on_leave, FILE* wait_msg_handle) : + ScriptInterpreterLocker (), m_teardown_session( (on_leave & TearDownSession) == TearDownSession ), m_python_interpreter(py_interpreter), m_tmp_fh(wait_msg_handle) @@ -2806,6 +2807,15 @@ ScriptInterpreterPython::GetDocumentationForItem(const char* item, std::string& } } +std::auto_ptr<ScriptInterpreterLocker> +ScriptInterpreterPython::AcquireInterpreterLock () +{ + std::auto_ptr<ScriptInterpreterLocker> py_lock(new Locker(this, + Locker::AcquireLock | Locker::InitSession, + Locker::FreeLock | Locker::TearDownSession)); + return py_lock; +} + void ScriptInterpreterPython::InitializeInterpreter (SWIGInitCallback python_swig_init_callback) { |