rpcsx/rpcs3/Emu/Cell
Eladash f2997e4c00 LV2: Fix the most annoying race ever
Timeline of the race:
1. The PPU is in SLEEP state. state = suspend.
2. lv2_obj::awake is called on the traced thread and is now in ONPROC state, state = signal.
3. lv2_obj::awake is called by another thread externally with a priority higher than our traced thread and appends it to g_pending. state = suspend + signal.
4. lv2_obj::sleep/set_priority (higering priority) is called on any thread which is in ONPROC. Causing it to enter SLEEP or RUNNING state, while the traced thread is back in queue in ONPROC. state = suspend + signal.
5. The traced thread finally calls lv2_obj::awake on itself, g_pending decrements to 0 and we a have a rescheduling event, after XOR state = 0!!! (no signal)
6. In check_state: cpu_sleep_called is now true and remains this way.
7. Another thread with a higher prioty kicks in and appends the traced thread into g_pending. state = suspend.
8. The traced thread is at cpu_thread::cpu_wait(), and that's where it's gonna spend the rest of its life.
2022-08-11 12:44:40 +03:00
..
lv2 LV2: Fix the most annoying race ever 2022-08-11 12:44:40 +03:00
Modules LV2: Move nearly all notifications out of all mutex scopes including IDM 2022-08-07 20:23:54 +03:00
Common.h PPU: implement accurate FRES 2022-05-11 10:46:08 +03:00
ErrorCodes.h Savestates: HLE state saving POC in sys_lwmutex 2022-07-06 19:43:25 +03:00
MFC.cpp Remove BOM markers 2020-12-06 15:30:12 +03:00
MFC.h Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
PPCDisAsm.h GUI Utilities: Implement instruction search, PPU/SPU disasm improvements (#10968) 2021-10-12 23:12:30 +03:00
PPUAnalyser.cpp PPU LLVM: allow to drop setting SAT flag (optimization, module-wide) 2021-12-03 00:14:06 +03:00
PPUAnalyser.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
PPUCallback.h Fix HLE callbacks within context of HLE PPU stack variables 2021-06-28 14:31:28 +03:00
PPUDisAsm.cpp SPU DisAsm: Force decimal point insertion for constant floats 2021-10-30 21:33:06 +02:00
PPUDisAsm.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
PPUFunction.cpp Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
PPUFunction.h Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
PPUInterpreter.cpp Enable ppu_feed_data in PPU Interpreter 2022-06-07 15:24:50 +03:00
PPUInterpreter.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
PPUModule.cpp Savestates: Decryption of executable fix 2022-07-08 12:57:43 +03:00
PPUModule.h Add stubs. 2022-04-10 18:28:57 +02:00
PPUOpcodes.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
PPUThread.cpp ppu/arm64: don't restore rsp on ppu_gateway return 2022-08-05 22:53:11 +02:00
PPUThread.h LV2: Optimizations and fixes 2022-08-11 11:42:16 +03:00
PPUTranslator.cpp PPU LLVM arm64+macOS port (#12115) 2022-06-14 15:28:38 +03:00
PPUTranslator.h PPU: implement accurate FRES 2022-05-11 10:46:08 +03:00
RawSPUThread.cpp SPU/PPU Loader: Implement linker/PS3 compiler executable files loading 2022-05-03 20:47:36 +03:00
RawSPUThread.h Migration to named_thread<> 2018-10-19 22:22:35 +03:00
SPUAnalyser.cpp Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
SPUAnalyser.h SPUAnalyzer.h: Add missing category check functions (#12222) 2022-06-14 16:04:24 +03:00
SPUASMJITRecompiler.cpp Savestates: Fix saving sys_event_queue_destroy 2022-07-08 12:57:43 +03:00
SPUASMJITRecompiler.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
SPUDisAsm.cpp SPU Disasm: Detect sys_event_flag_set_bit syscall 2022-06-20 20:50:11 +03:00
SPUDisAsm.h SPU DisAsm: Print SPU floats 2021-10-29 19:15:21 +02:00
SPUInterpreter.cpp Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
SPUInterpreter.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
SPUOpcodes.h Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
SPURecompiler.cpp SPU LLVM: Add integer compare optimization for FCMGT 2022-07-29 11:59:59 +03:00
SPURecompiler.h Remove built_function 2022-01-24 22:21:41 +03:00
SPUThread.cpp LV2: Move nearly all notifications out of all mutex scopes including IDM 2022-08-07 20:23:54 +03:00
SPUThread.h LV2: Make sys_mutex and sys_lwmutex lock-free, add some busy waiting in sys_mutex_lock 2022-08-07 20:23:54 +03:00
timers.hpp cellCrossControllerInitialize: add dialog 2022-07-13 19:12:46 +02:00