rpcs3/Utilities
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
..
address_range.h Use utils::c_page_size 2022-07-04 22:35:05 +03:00
bin_patch.cpp Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
bin_patch.h Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
bit_set.h simplify template code like std::is_same<T>::value 2024-04-21 18:15:17 +03:00
BitField.h Replace src_loc with std::soource_location 2024-05-21 14:19:12 +03:00
cfmt.h cfmt/StrFmt: support s128 formatting (untested) 2022-11-26 09:30:11 +03:00
cheat_info.cpp move try_to_int64 to StrUtil 2021-06-25 09:41:32 +03:00
cheat_info.h Fix some -Weffc++ warnings (part 2) 2021-04-03 21:54:15 +03:00
cond.cpp Linux: use futex_waitv syscall for atomic waiting 2023-08-02 21:46:06 +03:00
cond.h types.hpp: implement smin, smax, amin, amax 2021-05-22 12:10:57 +03:00
Config.cpp overlays: get localized values in home menu settings 2024-11-15 09:48:12 +01:00
Config.h overlays: get localized values in home menu settings 2024-11-15 09:48:12 +01:00
CRC.h Make compile with msvc, clang and gcc on Windows 2023-07-11 21:40:30 +03:00
date_time.h save-overlays: change list entry contents. 2021-04-30 00:30:26 +02:00
File.cpp fs: Minor fix of fs::dir::open 2024-11-28 05:47:40 +02:00
File.h Qt: Deprecate processEvents() part 2 2024-11-27 16:00:40 +02:00
geometry.h fix some warnings 2023-02-22 23:57:20 +01:00
git-version-gen.cmd Windows: update some comments and echos in git-version-gen.cmd 2023-09-02 10:39:25 +02:00
JIT.h Add fallback CPU detection when llvm is not aware of the CPU model 2024-08-03 21:35:10 +03:00
JITASM.cpp Block parallel JIT allocation on macos 2024-08-29 13:08:23 +03:00
JITLLVM.cpp Improve AMD cpu detection 2024-10-07 05:36:19 +02:00
lockless.h lockless.h: Fox 2024-11-18 18:45:34 +02:00
LUrlParser.cpp More random changes 2021-04-11 14:01:51 +03:00
LUrlParser.h Fix some -Weffc++ warnings (part 2) 2021-04-03 21:54:15 +03:00
mutex.cpp Linux: use futex_waitv syscall for atomic waiting 2023-08-02 21:46:06 +03:00
mutex.h IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
ppu_patch.h aarch64: Support calloc patch blocks 2024-08-31 13:55:58 +03:00
rXml.cpp Trophies: Add more sanity checks to pugixml backend 2023-05-30 19:11:57 +02:00
rXml.h Trophies: Add more sanity checks to pugixml backend 2023-05-30 19:11:57 +02:00
sema.cpp Rewrite Utilitis/sema.cpp 2023-09-11 15:44:33 +03:00
sema.h Rewrite Utilitis/sema.cpp 2023-09-11 15:44:33 +03:00
simple_ringbuf.cpp sys_rsxaudio: Initial implementation (#11907) 2022-05-05 15:47:44 +02:00
simple_ringbuf.h sys_rsxaudio: Initial implementation (#11907) 2022-05-05 15:47:44 +02:00
stack_trace.cpp aarch64: Fix compilation for windows-on-arm 2024-09-04 07:49:49 +03:00
stack_trace.h rsx: Fix surface metadata life-cycle 2022-12-17 20:16:58 +03:00
StrFmt.cpp More constexpr 2024-11-16 15:10:20 +01:00
StrFmt.h Add SPU usage for program dump 2024-07-28 12:36:42 +03:00
StrUtil.h RPCN 0.9 (#15002) 2024-01-05 09:43:26 +01:00
sync.h Fixup futex_waitv redefinition 2023-08-03 14:32:46 +03:00
Thread.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
Thread.h c++-ify empty return 2024-09-04 07:49:49 +03:00
Timer.h input: add enumeration threads for each hid_pad_handler 2022-02-01 19:28:04 +01:00
transactional_storage.h sys_rsxaudio: Initial implementation (#11907) 2022-05-05 15:47:44 +02:00
version.cpp Warning fixes 2022-09-17 16:35:02 +03:00
version.h Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00