dolphin/Source/Core/Core/PowerPC
Léo Lam f106a9637d Replace balanced Core::PauseAndLock calls with RunAsCPUThread
Core::PauseAndLock requires all calls to it to be balanced, like this:

    const bool was_unpaused = Core::PauseAndLock(true);
    // do stuff on the CPU thread
    Core::PauseAndLock(false, was_unpaused);

Aside from being a bit cumbersome, it turns out all callers really
don't need to know about was_unpaused at all. They just need to do
something on the CPU thread safely, including locking/unlocking.

So this commit replaces Core::PauseAndLock with a function that
makes both the purpose and the scope of what is being run on the
CPU thread visually clear. This makes it harder to accidentally run
something on the wrong thread, or forget the second call to
PauseAndLock to unpause, or forget that it needs to be passed
was_unpaused at the end.

We also don't need comments to indicate code X is being run on the
CPU thread anymore, as the function name makes it obvious.
2017-07-21 16:45:59 +08:00
..
CachedInterpreter Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
Interpreter Fix some GCC ODR warnings 2017-06-29 12:21:32 -07:00
Jit64 Fix some GCC ODR warnings 2017-06-29 12:21:32 -07:00
Jit64Common Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
JitArm64 Fix some GCC ODR warnings 2017-06-29 12:21:32 -07:00
JitArmCommon Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
JitCommon JitCache: use SymbolDB names as JIT block names 2017-06-18 06:58:44 +01:00
SignatureDB Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
BreakPoints.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
BreakPoints.h Fix memory breakpoint when checking the middle of the data 2017-03-18 22:48:57 -04:00
CPUCoreBase.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
GDBStub.cpp Core: Remove double newlines at the end of *_LOG messages. 2016-11-02 02:09:33 +00:00
GDBStub.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Gekko.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
JitInterface.cpp Move IOFile to a separate file 2017-06-15 21:33:50 +02:00
JitInterface.h JitInterface: Convert includes into forward declarations where applicable 2017-03-02 13:20:29 -05:00
MMU.cpp Replace MMU mask tests with dedicated function. 2017-06-22 20:22:53 +02:00
PowerPC.cpp Remove JITIL 2017-05-19 22:21:07 +02:00
PowerPC.h powerpc: silence an int->u32 init warning 2017-06-07 20:09:43 -07:00
PPCAnalyst.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
PPCAnalyst.h CodeView: Set Symbol Size added 2017-05-06 13:18:00 +01:00
PPCCache.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
PPCCache.h PowerPC: Explicitly savestate PowerPCState members 2017-01-18 23:44:46 -05:00
PPCSymbolDB.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
PPCSymbolDB.h Merge pull request #5459 from sepalani/code 2017-05-24 13:59:28 +02:00
PPCTables.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
PPCTables.h CPU Backends: Make each CPU backend responsible for initializing its own 2017-02-10 13:08:14 -05:00
Profiler.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
Profiler.h JitCache: Add a helper function to iterate over all blocks. 2017-01-12 20:23:14 +01:00