diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h index 2a01bcec260..23568cd4b36 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -12,6 +12,8 @@ // C Includes // C++ Includes +#include <condition_variable> +#include <mutex> #include <string> #include <queue> #include <vector> @@ -22,7 +24,6 @@ #include "lldb/Core/Communication.h" #include "lldb/Core/Listener.h" #include "lldb/Host/HostThread.h" -#include "lldb/Host/Mutex.h" #include "lldb/Host/Predicate.h" #include "lldb/Host/TimeValue.h" #include "lldb/Interpreter/Args.h" @@ -114,7 +115,7 @@ public: size_t payload_length); bool - GetSequenceMutex(Mutex::Locker& locker, const char *failure_message = nullptr); + GetSequenceMutex(std::unique_lock<std::recursive_mutex> &lock, const char *failure_message = nullptr); PacketType CheckForPacket (const uint8_t *src, @@ -285,9 +286,9 @@ protected: uint32_t m_echo_number; LazyBool m_supports_qEcho; #ifdef ENABLE_MUTEX_ERROR_CHECKING - TrackingMutex m_sequence_mutex; +#error TrackingMutex is no longer supported #else - Mutex m_sequence_mutex; // Restrict access to sending/receiving packets to a single thread at a time + std::recursive_mutex m_sequence_mutex; // Restrict access to sending/receiving packets to a single thread at a time #endif Predicate<bool> m_public_is_running; Predicate<bool> m_private_is_running; @@ -320,7 +321,7 @@ protected: bool sync_on_timeout); bool - WaitForNotRunningPrivate (const TimeValue *timeout_ptr); + WaitForNotRunningPrivate(const std::chrono::microseconds &timeout); bool CompressionIsEnabled () @@ -364,8 +365,8 @@ protected: private: std::queue<StringExtractorGDBRemote> m_packet_queue; // The packet queue - lldb_private::Mutex m_packet_queue_mutex; // Mutex for accessing queue - Condition m_condition_queue_not_empty; // Condition variable to wait for packets + std::mutex m_packet_queue_mutex; // Mutex for accessing queue + std::condition_variable m_condition_queue_not_empty; // Condition variable to wait for packets HostThread m_listen_thread; std::string m_listen_url; |