Skip to content

Commit d4c3c28

Browse files
committed
[lldb] Fix Process::SyncIOHandler
D157648 broke the function because it put the blocking wait into a critical section. This meant that, if m_iohandler_sync was not updated before entering the function, no amount of waiting would help. Fix that by restriciting the scope of the critical section to the iohandler check.
1 parent b1f14d6 commit d4c3c28

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/source/Target/Process.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,7 @@ void Process::SyncIOHandler(uint32_t iohandler_id,
627627
const Timeout<std::micro> &timeout) {
628628
// don't sync (potentially context switch) in case where there is no process
629629
// IO
630-
std::lock_guard<std::mutex> guard(m_process_input_reader_mutex);
631-
if (!m_process_input_reader)
630+
if (!ProcessIOHandlerExists())
632631
return;
633632

634633
auto Result = m_iohandler_sync.WaitForValueNotEqualTo(iohandler_id, timeout);

0 commit comments

Comments
 (0)