Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Nekotekina
ea5e837bd6
fixed_typemap.hpp: return reference
2021-03-02 16:08:14 +03:00
RipleyTom
81270f3142
Remove now useless code from sys_bnet_connect
2021-02-21 18:04:55 +03:00
Eladash
f43260bd58
Atomic waiting refactoring ( #9208 )
...
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117 )
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina
db8e6fe7a7
Enable -Wunused-variable
2021-01-12 14:34:14 +03:00
Nekotekina
fb29933d3d
Add usz alias for std::size_t
2020-12-18 12:23:53 +03:00
Nekotekina
6e05dcadb6
Reduce std::numeric_limits dependency
...
Please, stop pretending...
You need these templates for generic code.
In other words, in another templates.
Stop increasing compilation time for no reason.
2020-12-12 12:35:18 +03:00
Nekotekina
aa3aef4beb
std::chrono cleanup: always use steady_clock
2020-12-11 19:01:56 +03:00
Nekotekina
36c8654fb8
Remove HERE macro
...
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina
e055d16b2c
Replace verify() with ensure() with auto src location.
...
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom
af8c661a64
Remove BOM markers
2020-12-06 15:30:12 +03:00
RipleyTom
debfae06a8
Improve disconnected state handling of dns queries
2020-11-13 07:05:06 +03:00
RipleyTom
a83df01bfd
rpcn 0.3.5 ( #9227 )
2020-11-10 08:55:49 +00:00
Nekotekina
34fa010601
Improve cond_var notifiers
...
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Bevan Weiss
f4070731a8
NET: Add SO_RCVBUF / SO_SNDBUF defaults to .._bnet_socket
...
The OS defaults for SO_RCVBUF / SO_SNDBUF may not match what the defaults for the PS3 are.
And the code may be happy with the PS3 defaults, so may not set this explicitly.
So we'll do it when we establish the socket.
It also looks like the Windows recv behaviour is different for the MSG_PEEK option (and possibly in all situations where a smaller buffer is provided). I believe other platforms will return the size of the data received into the socket buffer, even if the supplied user buffer is smaller. Windows returns WSAEMSGSIZE instead. For the length of '1' MSG_PEEK request that is currently seen, we just mask this and return the full size of the buffer. This might need to be the case in all situations, I assume there will be applications that will supply an artificially small buffer and resize it as necessary based on the size of the received packet.
Add some additional translations from native->PS3 error codes
Rewrote handling of MSG_PEEK to just be a copy of what GalCiv suggested
Added WSAESHUTDOWN, and WSASetLastError as done by Cygwin
2020-10-28 20:54:29 +03:00
RipleyTom
9e14d240a8
Implement ethernet address determination
2020-10-16 22:53:48 +03:00
RipleyTom
1393bb2caf
Fix getsockname on windows for unbound sockets
2020-10-16 22:53:48 +03:00
RipleyTom
e9914f3004
Add sys_net error for EISCONN
2020-10-16 22:53:48 +03:00
RipleyTom
073772a801
Fixes setsockopt
2020-10-16 22:53:48 +03:00
RipleyTom
2babe4c236
Add better handling of RTT for STREAM_P2P
2020-10-16 22:53:48 +03:00
RipleyTom
bbda618beb
Improve poll for p2p sockets
2020-10-16 22:53:48 +03:00
RipleyTom
676fed7cfc
Only bind 3658 with RPCN
2020-09-09 23:56:25 +02:00
RipleyTom
d9d354c981
Makes DNS processing more consistent
2020-09-09 23:56:25 +02:00
RipleyTom
10820fa135
Implement sceNpSignaling & signaling improvements ( #8836 )
2020-09-07 22:50:17 +01:00
RipleyTom
4317291827
tcp_timeout_monitor deadlock fix ( #8783 )
2020-08-28 01:06:01 +01:00
RipleyTom
190822c2b2
RPCN Client ( #8663 )
2020-08-27 20:47:04 +01:00
Eladash
d9750e8f9f
SPU/PPU reservations: Optimizations for reservation locks and check_state() (non-TSX)
2020-07-09 03:17:35 +01:00
Derrik Touve
cb08c53f2f
sys_net: Use np_handler dns if possible for sys_net_infoctl ( #8557 )
...
Without this, cellHttpSendRequest will use the hardcoded dns 192.168.1.1, which won't work if you're not on that network.
2020-07-07 08:25:29 +02:00
Eladash
e1f8573c68
sys_net: Fix sys_net_bnet_setsockopt page faults
2020-06-12 22:39:13 +03:00
Eladash
4bc157881d
sys_net: Stub sys_net_infoctl command 9
2020-06-12 22:39:13 +03:00
Eladash
6892399699
kernel_explorer: More Improvements
2020-06-12 09:28:23 +02:00
Nekotekina
3d7c38ff9d
Remove lambda in sys_net_bnet_poll
2020-06-07 22:44:07 +03:00
Ani
9657b3f1d4
Fix sys_net_bnet_poll regression ( #8337 )
...
Co-authored-by: Eladash <elad3356p@gmail.com>
2020-06-04 17:30:11 +01:00
Eladash
2dcc3255b2
Fix sys_net_bnet_sendto ( #8026 )
2020-04-13 18:49:12 +01:00
Eladash
b45d836b89
sys_net: Fix sys_net_bnet_bind page faults
...
+ EINVAL checks
2020-04-13 04:34:10 +01:00
Eladash
8f32d44635
sys_net: Fix sys_net_bnet_sendto
2020-04-13 04:34:10 +01:00
Eladash
9fb30f130a
sys_net: Fix sys_net_bnet_getsockopt
...
+ EINVAL checks
2020-04-13 04:34:10 +01:00
Eladash
d91d420981
sys_net: EINVAL check in sys_net_bnet_listen
2020-04-13 04:34:10 +01:00
Eladash
442035c251
sys_net: EINVAL checks in sys_net_bnet_accept
2020-04-13 04:34:10 +01:00
Eladash
063902728b
sys_net: EINVAL checks in sys_net_bnet_recvfrom
2020-04-13 04:34:10 +01:00
Eladash
60a63fa4b6
sys_net: Fix sys_net_bnet_getsockname page faults
...
+ EINVAL checks
2020-04-13 04:34:10 +01:00
Eladash
7399a3f1e9
sys_net: Fix sys_net_bnet_getpeername page faults
...
+ EINVAL checks
2020-04-13 04:34:10 +01:00
Eladash
c4f6968aae
sys_net: Fix sys_net_bnet_connect page faults
...
+ EINVAL checks
2020-04-13 04:34:10 +01:00
Eladash
00957ca4bf
sys_net: Fix sys_net_bnet_select page faults
2020-04-13 04:34:10 +01:00
Eladash
179a9b3bf0
sys_net: Fix sys_net_bnet_poll page faults
2020-04-13 04:34:10 +01:00
Eladash
fdd7f0645d
Some typos ( #7908 )
...
* sys_lwcond: replace writer lock with reader lock
* sys_rsx: Typo fix
* sys_net: Fixup for buffer reading
2020-03-31 16:44:50 +03:00
Eladash
019aae8bec
sys_net: Fix access violation handling ( #7901 )
...
Should fix page faults notifications on unmapped menory on Gran Turismo 5.
2020-03-30 05:53:17 +01:00
Eladash
66bd8308d9
lv2: Wait for rescheduling before confirming timeouts ( #7875 )
2020-03-28 03:16:59 +00:00
Megamouse
21b6495aaa
Fix ui and sys_net warnings
2020-03-04 22:28:05 +01:00
Nekotekina Aux1
250736ece5
Fix warnings in emucore
2020-03-04 21:23:34 +03:00
RipleyTom
f1f5c91386
Fake PSN ( #7516 )
2020-03-04 13:55:35 +00:00
Nekotekina
5e75a0c497
Disable cotire on travis
...
Make some workarounds for clang because it poorly supports -Wold-style-cast
2020-02-21 17:03:54 +03:00
Nekotekina
92e3eaf3ff
Fix signed-unsigned comparisons and mark warning as error (part 2).
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
a8e1afa0af
sys_net: fix sys_net_bnet_select arg check (nfds)
2020-01-10 03:21:27 +03:00
Nekotekina
ef8872c0d7
sys_net: fix sys_net_bnet_connect on Windows
...
Properly write is_connecting variable.
2019-12-29 21:53:43 +03:00
Nekotekina
01b1b21efd
sys_net: add a workaround for WSAPoll with timeout
...
Don't call WSAPoll with empty socket list.
2019-12-29 21:24:13 +03:00
Nekotekina
abe2cc196a
sys_net: fixup for race condition
...
Don't reset is_connecting without checking correctness.
Also cleanup dead WIN32 code.
2019-12-23 22:39:18 +03:00
RipleyTom
90e4fe23c5
WSAPoll workaround
2019-12-23 22:31:09 +03:00
Jayveer
364ba95d26
Updated sys_net to use WSAPoll on win32 as this fixes connection issues
...
in Metal Gear Online. Also aligns with implementations on non win32
platforms
2019-12-13 21:52:29 +03:00
Nekotekina
ad9c9f0183
C-style cast cleanup II
2019-11-30 18:17:45 +03:00
Nekotekina
f31233b822
sys_net: don't report SYS_NET_EWOULDBLOCK in blocking syscalls
2019-11-22 18:56:40 +03:00
Nekotekina
5c55d4f2fe
sys_net: format both negative and positive sys_net_error values
2019-11-22 18:56:13 +03:00
Eladash
6ad8b0a443
sys_net: Add error_code
2019-11-21 22:51:22 +03:00
Nekotekina
16dd72b3e3
Replace some uses of Emu.IsStopped()
...
Poll thread state instead.
2019-10-12 21:12:47 +03:00
Nekotekina
9d4de51cb6
Use g_fxo for network thread
...
Minor refactoring
2019-10-08 23:12:54 +03:00
Nekotekina
7db2e2537f
Don't call lv2_obj::awake_all with empty list
...
Fixup after #5883
2019-08-22 02:13:39 +03:00
eladash
050339bb3e
PPU/LV2: Make thread-lists scheduling atomic
2019-08-17 22:46:36 +03:00
Eladash
85b1152e29
Timers scaling and fixes
2019-07-23 00:09:01 +01:00
Nekotekina
e1293b14f8
sys_net: add vm::temporary_unlock
2019-07-14 18:11:00 +03:00
Lassi Hämäläinen
c963c51a60
Remove unnecessary header includes
...
- Manually removed lot of unneeded #includes to clean code and reduce
compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Nekotekina
5d45a3e47d
Implement cpu_thread::suspend_all
...
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
msuih
baf42430d6
Decrease severity of sys_net_bnet_close
2019-04-16 18:39:57 +03:00
Nekotekina
96cabeadff
Rewrite condition variables
...
Implement helper functions balanced_wait_until and balanced_awaken
They include new path for Windows 8.1+ (WaitOnAddress)
shared_mutex, cond_variable, cond_one, cond_x16 modified to use it
Added helper function utils::popcnt16
Replace most semaphore<> with shared_mutex
2018-11-29 01:30:05 +03:00
Nekotekina
1b37e775be
Migration to named_thread<>
...
Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
2018-10-19 22:22:35 +03:00
Nekotekina
306f95a9ae
New named_thread template (preview)
...
Old class named_thread renamed to old_thread
It's too hard to move in a single commit
2018-09-27 14:04:16 +03:00
Nekotekina
ca5158a03e
Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
...
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Nekotekina
8abe6489ed
Mega-cleanup for atomic_t<> and named bit-sets bs_t<>
...
Remove "atomic operator" classes
Remove test, test_and_set, test_and_reset, test_and_complement global functions
Simplify atomic_t<> with constexpr if, remove some garbage
Redesign bs_t<> to use class, mark its methods constexpr
Implement atomic_bs_t<> for optimizations
Remove unused __bitwise_ops concept (should be in other header anyway)
Bitsets can now be tested via safe bool conversion
2018-09-03 21:40:36 +03:00
Nekotekina
363811981d
Reintroduce LOG_CHANNEL
...
Groundwork for further improvements
2018-08-25 15:39:00 +03:00
eladash
f349695a75
Rsx: rewrite address translation
2018-08-13 16:16:34 +03:00
Nekotekina
cce0ad0c35
Clean vm::ps3 namespace use
2018-02-09 17:49:37 +03:00
Nekotekina
a605919729
Fix lv2_socket id_base
2017-12-27 02:51:58 +03:00
Nekotekina
bfb3144f34
sys_net: Force AF_INET
2017-12-02 12:36:05 +03:00
clienthax
86a34fbb45
Fix regressions caused by network code. ( #3702 )
...
* Stub SOCK_DGRAM_P2P to allow some games to load again.
* Add 'support' for unspec sockets
(Have only seen the youtube app using these so far)
2017-11-20 16:42:16 +03:00
Nekotekina
3907dd0444
Implement SYS_NET_SO_REUSEPORT
2017-10-05 19:51:37 +03:00
Nekotekina
e5f756205c
sys_net full rewrite
...
Implement sys_net syscalls
Clean libnet functions
Use libnet.sprx
Use libhttp.sprx
Use libssl.sprx
Use librudp.sprx
Implement sys_ss_random_number_generator
2017-10-05 19:51:37 +03:00