jasonmolenda wrote:
I was worried about the timing in `MachProcess::PrivateResume` versus
`Interrupt` but I think it will be OK. `PrivateResume` does
```
void MachProcess::PrivateResume() {
PTHREAD_MUTEX_LOCKER(locker, m_exception_messages_mutex);
// Set our state accordingly
if (m_thread_actions.NumActionsWithState(eStateStepping))
SetState(eStateStepping);
else
SetState(eStateRunning);
// Now resume our task.
m_task.Resume();
}
```
and `SetState` acquires the `m_state_mutex` (which `GetState` also acquires),
so it is possible for Interrupt to call `GetState()` while this is calling
`m_task.Resume()` which actually resumes the process, but because
`PrivateResume` is holding the `m_exception_messages_mutex` mutex still, our
conditional block will wait until the `m_task.Resume()` has completed and this
function exits. Should be OK.
https://github.com/llvm/llvm-project/pull/131073
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits