diff --git a/Source/Core/Core/HW/CPU.h b/Source/Core/Core/HW/CPU.h index 4fa0c1105bc..887d899710f 100644 --- a/Source/Core/Core/HW/CPU.h +++ b/Source/Core/Core/HW/CPU.h @@ -86,15 +86,16 @@ public: // Strictly read-only. A lock is required to change the value. const State* GetStatePtr() const; - // Locks the CPU Thread (waiting for it to become idle). - // While this lock is held, the CPU Thread will not perform any action so it is safe to access - // PowerPC, CoreTiming, etc. without racing the CPU Thread. - // Cannot be used recursively. Must be paired as PauseAndLock(true)/PauseAndLock(false). - // Return value for do_lock == true is whether the state was State::Running or not. - // Return value for do_lock == false is whether the state was changed *to* State::Running or not. - // Cannot be used by System threads as it will deadlock. It is threadsafe otherwise. - // "control_adjacent" causes PauseAndLock to behave like SetStepping by modifying the - // state of the Audio and FIFO subsystems as well. + // Locks the CPU Thread (waiting for it to become idle). While this lock is held, the CPU Thread + // will not perform any action so it is safe to access PowerPC, CoreTiming, etc. without racing + // the CPU Thread. + // + // Cannot be used recursively. Cannot be used by System threads as it will deadlock. It is + // threadsafe otherwise. + // + // Each call to PauseAndLock must be paired with a call to RestoreStateAndUnlock. The return value + // for PauseAndLock is whether the state was State::Running or not and should be passed as the + // argument to RestoreStateAndUnlock. bool PauseAndLock(); void RestoreStateAndUnlock(bool unpause_on_unlock);