Commit graph

32 commits

Author SHA1 Message Date
Emma
10e0fb2b54
sys_prx: implement get_module_id_by_name, module_info_v2 (#16573) 2025-01-18 15:16:38 +02:00
Elad
575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
oltolm
2b0f786b2d
Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
Elad Ashkenazi
e6a7597444
PRX/savestates/VSH: Associate PRX with library, fix VSH browser (#13221)
* PRX/savestate:s Associate PRX with library

* VFS/Savestates: Fix host_root resolving

* Savestates: Fix segfault in ppu_initialize

* SPU: Avoid some log spam

* VSH/sys_vm: Fix limit on root processes
2023-01-15 23:12:54 +03:00
Eladash
820e692e57 PRX: Implement multi-referenced library management 2022-12-25 16:10:32 +03:00
Eladash
b875a86e1d PRX: export functions on start() 2022-11-09 02:28:12 +03:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Megamouse
617d21fa84 sys_prx: more constants 2021-04-23 22:02:52 +02:00
Eladash
32116086b3 Implement _sys_prx_register_module loading imports/exports functionality 2021-04-03 17:23:40 +03:00
Nekotekina
dff4392c10 Move error_code to ErrorCodes.h 2020-12-12 15:12:01 +03:00
RipleyTom
af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina
d022e7cd27 sys_prx: add cpu_flag::wait 2020-11-04 14:59:26 +03:00
Megamouse
2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Eladash
e1f2f3f081 sys_prx: Improve sys_prx_start/stop_module
* Add missing error codes, "internal" errors are ones which are not reachable from liblv2.sprx functions

* Implement SYS_PRX_NO_RESIDENT (unloading module) for _sys_prx_start_module.
2020-03-25 16:22:47 +03:00
Eladash
997e3046e3 vm/sys_overlay Improvements
- Implement sys_overlay_load_module_by_fd.
- Implement special segment allocation when ppc_seg flag is specified.
2019-07-28 14:23:58 +03:00
Lassi Hämäläinen
e9e87b8bd9 Add missing #includes to header files
- Multiple header files where missing #includes to other headers that
  where used in the header. Correct header was included in correct
  order in source files which caused everything to compile.
- Added missing #includes so header files correctly include all their
  dependencies and fixes problems with IDEs being unable to parse
  headers correctly due to missing symbols
2019-06-25 17:11:10 +03:00
eladash
d555eeb0f4 Check start status in sys_prx_start/stop_module 2019-04-11 17:47:52 +03:00
Nekotekina
cce0ad0c35 Clean vm::ps3 namespace use 2018-02-09 17:49:37 +03:00
RipleyTom
e4105f46de Implement _sys_prx_get_module_info 2017-09-08 00:06:53 +03:00
scribam
1899f399b6 Mixed minor changes 2017-07-26 17:49:40 +03:00
Nekotekina
7702eb2fa7 PPU: clean linkage info 2017-07-12 21:29:09 +03:00
Jake
d3df83a3ea Sprx: loading / reloc fixes 2017-06-21 19:28:05 +03:00
Nekotekina
2fd58dc7e8 sys_prx updated 2017-04-16 17:44:19 +03:00
Nekotekina
0eb6bf6a67 LLVM: splitting and caching 2017-02-26 20:14:18 +03:00
Nekotekina
fe26db4d36 idm::last_id cleanup 2017-02-04 20:39:04 +03:00
Nekotekina
b21fce4d6f IdManager improved
lv2_obj for kernel objects
Simple lookup (vector)
Another idm API refactoring
2017-01-29 21:37:04 +03:00
Nekotekina
df6607e236 Minor fixes 2017-01-28 03:21:11 +03:00
Nekotekina
591a6c8671 IdManager improved 2017-01-25 23:29:36 +03:00
Ivan
77594dc66c PPU LLVM: New analyser (#1858)
Minor fixes
VEX prefix support
2016-07-07 21:42:39 +03:00
Nekotekina
a8bebcba55 LLVM AOT 2016-06-19 21:29:48 +03:00
Ivan
aafcf44581 Header optimizations (#1684)
Shouldn't break anything. I hope.
2016-04-27 01:27:24 +03:00
Nekotekina
42e1d4d752 Partial commit: Syscalls 2016-04-15 19:22:30 +03:00
Renamed from rpcs3/Emu/SysCalls/lv2/sys_prx.h (Browse further)