Commit graph

30 commits

Author SHA1 Message Date
RipleyTom a29ecaf1d3 Fix sendto for p2ps packets 2025-02-14 22:28:11 +00:00
RipleyTom 159370446f RPCN v1.4 2025-02-12 15:00:50 +01:00
Elad d376ba5994 Remove lv2_socket_native destructor 2024-12-24 21:31:57 +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
RipleyTom a50683d6ca
sys_net improvements (#15584)
Also remove redundant ensures
2024-05-13 05:35:08 +03:00
RipleyTom b7a882f42b Split normal sockets and p2p sockets handling v2 2024-05-08 20:04:23 +03:00
RipleyTom b38ce9452d Revert "Split normal sockets and p2p sockets handling"
This reverts commit 08c3a38b67.
2024-04-27 10:45:14 +02:00
RipleyTom 08c3a38b67 Split normal sockets and p2p sockets handling 2024-04-24 14:15:17 +03:00
RipleyTom ac8e914a25
improves sig_ctx handling, sys_net logging and fixes udpp2p protocol (#15235) 2024-02-24 12:40:53 +01:00
RipleyTom 26d406fec3 RPCN 1.1 2024-02-05 09:44:29 +01:00
Megamouse 59c58aa3cf fix some warnings 2023-12-30 19:07:35 +01:00
RipleyTom 03761c5dd4 rpcn 0.8 2023-12-29 19:22:49 +01:00
RipleyTom dbd1f27862 Replace condition_variable with atomic_t 2023-12-20 15:28:47 +02:00
Eladash 7e853abc4b Fix tcp_timeout_monitor abort 2023-12-19 15:34:07 +02:00
Eladash 0c410f8a14 Postpone thread launching on g_fxo->init 2023-12-19 15:34:07 +02:00
RipleyTom 0f45a8c180 Fix inaccuracies pointed out by PVS-Studio 2023-03-25 08:45:30 +01:00
RipleyTom 7ae9b15b5c sys_net: return appropriate packet size for P2P 2022-10-22 20:14:32 +03:00
RipleyTom 9b121a6414 sys_net: improvements
sys_net: implement reusable addr for p2p sockets
sys_net: implement getpeername for P2PS
sys_net: sockets inherit NBIO from their parent
2022-10-22 11:32:04 +02:00
RipleyTom eea73deab3 RPCN v0.6 2022-09-27 23:39:54 +03:00
Nekotekina 6ff6a4989a Implement at32() util
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
cohaereo 2655255d4d sys_net: Implement sys_net_bnet_sendmsg for native sockets 2022-09-25 18:24:47 +03:00
Nekotekina b49a1f27eb Warning fixes 2022-09-17 16:35:02 +03:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
RipleyTom 3dc9a8b980 fix lv2_socket_native::accept 2022-05-23 07:36:51 +02:00
Megamouse e494fc04e5 sceNp: add some constants 2022-05-10 21:55:35 +02:00
RipleyTom 26d8120168 sys_net fixes and extra logging 2022-04-15 19:43:23 +02:00
RipleyTom d6b0263144 sys_net fixes
Fix lv2_socket_p2ps::connect
Fix sys_net_bnet_poll
2022-04-14 09:18:58 +02:00
RipleyTom 4d26535758 sys_net: bind & getsockname accuracy 2022-04-12 08:58:17 +02:00
RipleyTom c06cb4664a Various sys_net improvements
Implement P2PS select
Adjust P2P sendto return value
2022-04-09 21:56:53 +02:00
RipleyTom 72b2876b6a
sys_net refactor (#11740) 2022-04-09 14:51:22 +02:00