Permalink
Browse files

Debugger: Allow multiple clients more properly.

Otherwise we lose wakeups and hang.
  • Loading branch information...
unknownbrackets committed Apr 20, 2018
1 parent 07e178a commit e9cc1ee46395599dd90d263a399b5d15bed12805
Showing with 8 additions and 8 deletions.
  1. +5 −5 Core/Core.cpp
  2. +3 −3 GPU/Debugger/Stepping.cpp
View
@@ -98,7 +98,7 @@ void Core_Halt(const char *msg) {
void Core_Stop() {
Core_UpdateState(CORE_POWERDOWN);
Core_NotifyShutdown();
m_StepCond.notify_one();
m_StepCond.notify_all();
}
bool Core_IsStepping() {
@@ -239,11 +239,11 @@ void Core_RunLoop(GraphicsContext *ctx) {
void Core_DoSingleStep() {
singleStepPending = true;
m_StepCond.notify_one();
m_StepCond.notify_all();
}
void Core_UpdateSingleStep() {
m_StepCond.notify_one();
m_StepCond.notify_all();
}
void Core_SingleStep() {
@@ -253,7 +253,7 @@ void Core_SingleStep() {
static inline void CoreStateProcessed() {
if (coreStatePending) {
coreStatePending = false;
m_InactiveCond.notify_one();
m_InactiveCond.notify_all();
}
}
@@ -338,6 +338,6 @@ void Core_EnableStepping(bool step) {
host->SetDebugMode(false);
coreState = CORE_RUNNING;
coreStatePending = false;
m_StepCond.notify_one();
m_StepCond.notify_all();
}
}
@@ -67,7 +67,7 @@ static void SetPauseAction(PauseAction act, bool waitComplete = true) {
pauseLock.unlock();
actionComplete = false;
pauseWait.notify_one();
pauseWait.notify_all();
while (waitComplete && !actionComplete) {
actionWait.wait(guard);
}
@@ -113,7 +113,7 @@ static void RunPauseAction() {
}
actionComplete = true;
actionWait.notify_one();
actionWait.notify_all();
pauseAction = PAUSE_BREAK;
}
@@ -200,7 +200,7 @@ void ResumeFromStepping() {
void ForceUnpause() {
SetPauseAction(PAUSE_CONTINUE, false);
actionComplete = true;
actionWait.notify_one();
actionWait.notify_all();
}
} // namespace

0 comments on commit e9cc1ee

Please sign in to comment.