dolphin/Source/Core/Core
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
..
Boot FileUtil: Add a class for Exists/IsDirectory/GetSize 2017-06-29 19:07:29 +02:00
Config Merge pull request #5594 from MerryMage/phack 2017-06-16 18:36:39 +02:00
ConfigLoaders Unify GetGameIniFilenames 2017-07-11 13:10:11 +02:00
DSP DSPDisassembler: fail when buffer too large 2017-06-30 01:47:02 -07:00
Debugger Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
FifoPlayer FifoRecorder: Don't allocate ~100.7MB on program startup 2017-06-19 02:47:26 -04:00
HLE Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
HW Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
IOS Add warning comments to RegionSwitch and code that uses it 2017-07-16 14:49:28 +02:00
PowerPC Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
ARDecrypt.cpp do not assign in conditional statements 2017-06-07 20:09:44 -07:00
ARDecrypt.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
ActionReplay.cpp LogManager: clean up header 2017-07-07 16:44:38 -07:00
ActionReplay.h CheatManager/ISOProperties: Refactor ActionReplay tabs as a class 2016-08-31 14:32:12 +10:00
Analytics.cpp VideoConfig: add bSupportsFragmentStoresAndAtomics 2017-03-15 17:20:47 -07:00
Analytics.h ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
BootManager.cpp Boot: Clean up the boot code 2017-06-06 16:27:52 +02:00
BootManager.h Boot: Clean up the boot code 2017-06-06 16:27:52 +02:00
CMakeLists.txt Move WiiUtils to Core 2017-06-28 11:22:10 +02:00
CommonTitles.h IOS/ES: Refuse to launch the shop with default credentials 2017-06-26 20:30:13 +02:00
ConfigManager.cpp Fix the handling of NTSC-K for GCI folders 2017-07-16 16:31:12 +02:00
ConfigManager.h Fix the handling of NTSC-K for GCI folders 2017-07-16 16:31:12 +02:00
Core.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Core.h Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Core.vcxproj Move WiiUtils to Core 2017-06-28 11:22:10 +02:00
Core.vcxproj.filters Move WiiUtils to Core 2017-06-28 11:22:10 +02:00
CoreTiming.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
CoreTiming.h JitArm64: Implement timer SPRs 2017-04-25 09:20:09 +01:00
DSPEmulator.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
DSPEmulator.h DSPEmulator: Amend variable casing 2017-01-18 12:20:13 -05:00
GeckoCode.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
GeckoCode.h GeckoCode: Provide operator== and operator!= overloads 2016-10-03 02:32:43 -04:00
GeckoCodeConfig.cpp Common: Add HttpRequest to simplify HTTP requests 2017-06-13 12:52:31 +02:00
GeckoCodeConfig.h Move GeckoCodeDiag download logic to GeckoCodeConfig 2017-04-05 12:48:35 -07:00
Host.h DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
HotkeyManager.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
HotkeyManager.h Implement hotkey options group in HotkeyInputConfigDiag 2017-03-13 13:39:52 -07:00
MachineContext.h Initial support for Haiku. 2017-03-27 23:46:19 -04:00
MemTools.cpp JitInterface: Convert includes into forward declarations where applicable 2017-03-02 13:20:29 -05:00
MemTools.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
MemoryWatcher.cpp Core: Change CoreTiming event key from int to EventType* 2016-09-03 14:55:44 +10:00
MemoryWatcher.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Movie.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Movie.h Boot: Clean up the boot code 2017-06-06 16:27:52 +02:00
NetPlayClient.cpp Core: include what you use 2017-06-07 01:20:48 -04:00
NetPlayClient.h NetPlayClient: const correctness 2017-03-19 09:32:58 -04:00
NetPlayProto.h EXI: Namespace device classes 2017-03-18 21:13:12 -04:00
NetPlayServer.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
NetPlayServer.h NetPlayServer: const correctness 2017-03-19 09:36:40 -04:00
PatchEngine.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
PatchEngine.h PatchEngine: Add Reload() function 2017-04-09 14:02:33 +01:00
State.cpp Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
State.h Frame: Remove callback function prototypes from header 2017-04-03 06:34:36 -04:00
TitleDatabase.cpp Improve Japanese check in TitleDatabase 2017-07-16 14:33:14 +02:00
TitleDatabase.h TitleDatabase: Fix header includes 2017-05-22 02:02:04 +02:00
WiiRoot.cpp Core: Remove useless ShutdownWiiRoot calls 2017-06-10 20:00:43 +02:00
WiiRoot.h Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
WiiUtils.cpp WiiUtils: Add an online updater 2017-06-28 11:22:10 +02:00
WiiUtils.h WiiUtils: Add an online updater 2017-06-28 11:22:10 +02:00
ec_wii.cpp IOS/ES: Refuse to launch the shop with default credentials 2017-06-26 20:30:13 +02:00
ec_wii.h IOS/ES: Refuse to launch the shop with default credentials 2017-06-26 20:30:13 +02:00