rpcsx/rpcs3/Emu/NP
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
..
generated Implement old matching API 2024-09-19 20:34:56 +02:00
fb_helpers.cpp Implement old matching API 2024-09-19 20:34:56 +02:00
fb_helpers.h Implement old matching API 2024-09-19 20:34:56 +02:00
np_allocator.h Implement at32() util 2022-09-26 18:04:15 +03:00
np_cache.cpp sceNp: add some more rpcn array pointer checks 2024-06-12 00:18:37 +02:00
np_cache.h Add matching2 option handling 2024-05-16 22:38:11 +02:00
np_contexts.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_contexts.h IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_dnshook.cpp logging: minor trace optimizations 2023-06-15 19:48:15 +02:00
np_dnshook.h dnshook: add asterisk support 2022-05-05 18:49:39 +02:00
np_event_data.h Implement old matching API 2024-09-19 20:34:56 +02:00
np_gui_cache.cpp Implement old matching API 2024-09-19 20:34:56 +02:00
np_gui_cache.h Implement old matching API 2024-09-19 20:34:56 +02:00
np_handler.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_handler.h IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_helpers.cpp sceNp: Improve SceNpCommunicationId logging 2024-07-18 21:42:07 +03:00
np_helpers.h sceNp: Improve SceNpCommunicationId logging 2024-07-18 21:42:07 +03:00
np_notifications.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_requests.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_requests_gui.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
np_structs_extra.cpp Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
np_structs_extra.h Fake sceNpMatching2GetLobbyInfoList 2024-09-26 21:12:10 +02:00
rpcn_client.cpp IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
rpcn_client.h IDM: Implement lock-free smart pointers (#16403) 2024-12-22 20:59:48 +02:00
rpcn_config.cpp fix some warnings 2023-12-30 19:07:35 +01:00
rpcn_config.h RPCN v0.6 2022-09-27 23:39:54 +03:00
rpcn_countries.cpp Enable user to change country code (#15884) 2024-08-10 22:33:38 +02:00
rpcn_countries.h Enable user to change country code (#15884) 2024-08-10 22:33:38 +02:00
signaling_handler.cpp sys_net improvements (#15584) 2024-05-13 05:35:08 +03:00
signaling_handler.h improves sig_ctx handling, sys_net logging and fixes udpp2p protocol (#15235) 2024-02-24 12:40:53 +01:00
upnp_config.cpp fix some warnings 2023-12-30 19:07:35 +01:00
upnp_config.h rpcn: signaling handler improvements & upnp 2023-02-21 15:41:41 +01:00
upnp_handler.cpp rpcn: signaling handler improvements & upnp 2023-02-21 15:41:41 +01:00
upnp_handler.h rpcn: signaling handler improvements & upnp 2023-02-21 15:41:41 +01:00
vport0.h RPCN v0.6 2022-09-27 23:39:54 +03:00