rpcsx/rpcs3/util
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
..
asm.hpp Compilation hotfix 2024-10-25 13:21:49 +03:00
atomic.cpp utils/atomic.hpp: Make atomic_op reject non-non-const lvalue 2024-11-02 21:43:35 +02:00
atomic.hpp utils/atomic.hpp: Make atomic_op reject non-non-const lvalue 2024-11-02 21:43:35 +02:00
auto_typemap.hpp Typemap: Set init to false after each individual destructor 2023-12-25 11:14:11 +02:00
bless.hpp Workaround for Clang: move bless to its own header file 2023-08-19 13:30:46 +03:00
console.cpp Win32: Fix deadlock on std::cerr usage 2024-05-04 14:15:51 +03:00
console.h Win32: Fix deadlock on std::cerr usage 2024-05-04 14:15:51 +03:00
coro.hpp Introduce coroutine support (util/coro.hpp) 2021-12-07 13:04:10 +03:00
cpu_stats.cpp fix some warnings 2023-12-30 19:07:35 +01:00
cpu_stats.hpp Windows Use vector for performance counter data allocation 2023-05-18 09:15:49 +02:00
dyn_lib.cpp Remove BOM markers 2020-12-06 15:30:12 +03:00
dyn_lib.hpp Create Missing Paths for Dev_USB/HDD0 and mms 2023-07-19 12:01:44 +03:00
endian.hpp simplify template code like std::invoke_result<T>::type 2024-04-21 18:15:17 +03:00
fence.hpp Make compile with msvc, clang and gcc on Windows 2023-07-11 21:40:30 +03:00
fifo_mutex.hpp Linux: use futex_waitv syscall for atomic waiting 2023-08-02 21:46:06 +03:00
fixed_typemap.hpp Savestates: Fixup 2024-04-13 20:14:49 +03:00
fnv_hash.hpp simplify template code like std::is_same<T>::value 2024-04-21 18:15:17 +03:00
init_mutex.hpp init_mutex.hpp: More fixes 2024-03-06 20:32:22 +02:00
logs.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
logs.hpp Qt: Exit And Save Log - toolbar action (#14212) 2023-07-18 05:11:53 +03:00
media_utils.cpp Video Encode: do not set the frame_number 2024-08-01 18:04:47 +02:00
media_utils.h cellRec: fix pausing and resuming 2023-11-23 21:19:31 +01:00
serialization.hpp cellGem: split status_flags into calibration flags and runtime flags 2024-12-20 17:30:25 +01:00
serialization_ext.cpp Fix some warnings 2024-05-18 16:16:08 +02:00
serialization_ext.hpp Savestates: Multi-threaded compression, use ZSTD 2024-05-14 19:36:48 +03:00
shared_ptr.hpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
simd.hpp cellAdec implementation part 2: LPCM decoder (#16381) 2024-12-18 20:21:56 +02:00
slow_mutex.hpp More random changes 2021-04-11 14:01:51 +03:00
sysinfo.cpp utils/sysinfo.cpp: Yield CPU time when measuring TSC freq 2024-10-30 10:06:49 +02:00
sysinfo.hpp Fix get_system_time() 2024-10-29 19:26:33 +02:00
to_endian.hpp simplify template code like std::is_same<T>::value 2024-04-21 18:15:17 +03:00
tsc.hpp Make compile with msvc, clang and gcc on Windows 2023-07-11 21:40:30 +03:00
typeindices.hpp fix some warnings 2023-02-22 23:57:20 +01:00
types.hpp Fix some static analysis warnings 2024-12-17 20:46:07 +01:00
v128.hpp fix some warnings 2023-12-30 19:07:35 +01:00
video_provider.cpp recording: use scoped_lock 2023-11-30 00:34:32 +01:00
video_provider.h recording: optimize access to video recorder 2023-11-30 00:34:32 +01:00
video_sink.h Cleanup and set -Werror=delete-non-virtual-dtor 2024-03-11 02:30:18 +02:00
vm.hpp vm: use sparse files to emulate overcommit memory 2022-08-12 13:59:03 +03:00
vm_native.cpp Update vm_native.cpp 2024-11-16 13:53:25 +02:00
yaml.cpp Qt/patches: uze const ref for YAML::Node params 2024-08-14 20:21:55 +02:00
yaml.hpp Qt/patches: uze const ref for YAML::Node params 2024-08-14 20:21:55 +02:00