Commit graph

91 commits

Author SHA1 Message Date
Eladash 194f7375da SPU/LV2: Fix tiny race conditions 2022-09-21 20:35:34 +03:00
Eladash 37aefe5811 sys_ppu_thread: Fix max thread name size 2022-09-12 12:57:39 +03:00
Eladash 683c1a6512 LV2: Optimize sys_ppu_thread a bit 2022-08-11 11:42:16 +03:00
Eladash 34bae90820 LV2: Move nearly all notifications out of all mutex scopes including IDM 2022-08-07 20:23:54 +03:00
Eladash 3fc2194fd5 Savestates: Fix zombie PPU threads saving 2022-07-05 08:25:36 +02:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
RipleyTom da6434a65a
Implements sys_fs_fcntl 0xC0000008 & 0xC000001A (#11957) 2022-06-11 13:12:42 +01:00
Eladash 961d41d0bd RawSPU: Reinvoke pending interrupts if missed 2022-05-25 11:46:51 +03:00
Nekotekina 5c1f79ab26 vm: remove g_mutex, use g_range_lock instead
Simplification and performance improvements.
2022-05-02 10:29:28 +03:00
DH 2981867375 sys_spu_thread: Removed unused field access 2021-12-02 21:36:57 +03:00
Eladash 98e40d12ef sys_ppu: Implement sys_ppu_thread_rename 2021-07-19 12:37:33 +02:00
Eladash 8e2c34a003 PPU debugger: Implement PPU calling history 2021-07-17 17:28:23 +02:00
Eladash 44f0ca08e2 Simplify PPU exit 2021-05-25 22:47:23 +03:00
Eladash daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Eladash 478ae0715e Tiny fix for zombie PPU threads 2021-02-03 15:05:38 +03:00
Eladash 7f28489c70 Improve ppu_thread_cleaner a bit
Always join thread.
2021-01-21 21:32:13 +03:00
Eladash a58c12db0b SPU: fixup after #9630
Co-Authored-By: Ivan <nekotekina@gmail.com>
2021-01-21 21:32:13 +03:00
Eladash 12e1be2626 Implement thread_ctrl::wait_on (see #9208) 2021-01-21 18:31:51 +03:00
Eladash f81674232e Remove SPU and PPU destructors 2021-01-21 18:31:51 +03:00
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina b5d498ffda Homebrew atomic_ptr rewritten (util/shared_ptr.hpp)
It's analogous to C++20 atomic std::shared_ptr

The following things brought into global namespace:
single_ptr
shared_ptr
atomic_ptr
make_single
2020-11-26 20:11:26 +03:00
Nekotekina 34fa010601 Improve cond_var notifiers
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Nekotekina ba5ed5f380 Fix vm::lock_range wrong check
Minor header refactoring.
2020-11-04 14:59:26 +03:00
Nekotekina 58adb6a1aa sys_ppu_thread: add cpu_flag::wait 2020-10-30 18:27:15 +03:00
Eladash d9750e8f9f SPU/PPU reservations: Optimizations for reservation locks and check_state() (non-TSX) 2020-07-09 03:17:35 +01:00
Eladash e45d37073a debugger: Shortend SPU/PPU thread names 2020-06-24 17:44:06 +02:00
Eladash d86c9a2549 sys_mmapper: rewrite page fault thread notifications
* Fix a corner case where SPU thread has the same ID as a PPU thread.
* Fix a potential deadlock on Emu.Stop() while sending event in EBUSY loop.
* Thread specific notifications.
2020-06-18 20:13:54 +03:00
Eladash dd6825a7bd Fix sys_ppu_thread_start error checking, fix rare bug in sys_ppu_thread_create
* Correct error code to EBUSY.
* lv2_obj::awake was called even when EBSUY should be returned.
* Fix sys_ppu_thread_create for a newly created thread with the same id as ppu_thread::id_base. (can happen if main thread exited before its creation)
2020-04-29 08:58:09 +03:00
Eladash c1dc6838fa Fix sys_ppu_thread_get_priority page faults 2020-04-29 07:57:47 +03:00
Eladash bb950cbb3b vm: Fix possible IDM deadlock with Page Fault Notifications (partial) 2020-04-12 10:30:38 +01:00
Eladash c948c9305c sys_ppu_thread_create: read function descriptor immediately and save it 2020-04-08 19:23:13 +03:00
Eladash dc5cdb3bb4 sys_ppu_thread: reduce global memory stats after thread creation 2020-04-05 15:23:09 +03:00
Eladash b11e8f8b8d Minor fix of sys_ppu_thread_yield return value
Account for a special case where threads were rotated but no context
switch was made.
2020-03-19 06:45:14 +03:00
Eladash 664d606123 Add return value of sys_ppu_thread_yield 2020-03-17 18:22:13 +03:00
Nekotekina 45389dca51 PPU: minor fix for ppu_join_status::max
Don't treat it as special "invalid" value.
2020-03-14 20:36:56 +03:00
Eladash efe6e1eb0a sys_ppu_thread: Make PPU id removal after exit atomic with descheduling
* Make PPU id removal after exit atomic with descheduling
* Make joining thread scheduling atomic with thread exit sleep.
* Update sys_ppu_thread_stop/restart.
* Add idm::remove_verify.
2020-03-14 18:30:14 +02:00
Nekotekina bd234a7668 sys_ppu: another fixup 2020-03-02 10:35:54 +03:00
Nekotekina c7fa4e2375 Fixup 2020-03-01 22:40:48 +03:00
Nekotekina 6ee9153329 sys_ppu_thread: fixing detached threads 2020-03-01 22:29:03 +03:00
Nekotekina b05b16aedc sys_ppu: Hotfix for detached threads 2020-03-01 18:30:16 +03:00
Nekotekina 490f58ff3c Try to purge thread_state::detached
It's rarely necessary, but can cause unexpected problems.
2020-02-28 21:11:13 +03:00
Nekotekina 65eeee0f4c Remove cancerous lf_value<>
Replace thread names (generic, PPU, SPU) with new shared pointers.
Devirtualize cpu_thread::get_name (used in single case).
2020-02-28 18:54:46 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash 7ae679adbe Fix logging of ppu name in sys_ppu_thread_create/rename 2020-01-26 20:32:10 +00:00
Eladash 9d15083c61 Fix sys_ppu_thread_create/rename thread name range 2020-01-18 18:46:13 +03:00