Commit graph

14 commits

Author SHA1 Message Date
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
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Megamouse d854a39500 add a gazillion more error_code 2020-07-24 14:47:10 +02:00
Nekotekina 771eff273b First part of fixing sign-compare warning (inside be_t). 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
Nekotekina 835892aa51 C-style cast cleanup VII 2019-12-05 02:10:15 +03:00
Nekotekina 185c067d5b C-style cast cleanup V 2019-12-03 17:23:00 +03:00
Eladash 85b1152e29 Timers scaling and fixes 2019-07-23 00:09:01 +01:00
Nekotekina 363811981d Reintroduce LOG_CHANNEL
Groundwork for further improvements
2018-08-25 15:39:00 +03:00
VelocityRa 754cdea435 Avoid recreating SwsContext every frame
* Applies to video decoding(`libvdec`) and post-processing(`libvpost`).
2017-11-27 22:35:40 +04:00
Nekotekina 88fef183a3 config.yml: Log section optimized 2017-05-15 14:37:05 +03:00
Nekotekina e2d82394f6 Cell 2016-05-23 16:22:23 +03:00
Nekotekina 5637c22363 Partial commit: Modules (cell) 2016-04-15 19:22:29 +03:00
Renamed from rpcs3/Emu/SysCalls/Modules/cellVpost.cpp (Browse further)