MeloNX/src/Ryujinx.HLE/HOS/Services
jhorv 21e88f17f6
ServerBase thread safety (#4577)
* Add guard against ServerBase.Dispose() being called multiple times. Add reset event to avoid Dispose() being called while the ServerLoop is still running.

* remove unused usings

* rework ServerBase to use one collection each for sessions and ports, and make all accesses thread-safe.

* fix Logger call

* use GetSessionObj(int) instead of using _sessions directly

* move _threadStopped check inside "dispose once" test

* - Replace _threadStopped event with attempt to Join() the ending thread (if that isn't the current thread) instead.

- Use the instance-local _selfProcess and (new) _selfThread variables to avoid suggesting that the current KProcess and KThread could change. Per gdkchan, they can't currently, and this old IPC system will be removed before that changes.

- Re-order Dispose() so that the Interlocked _isDisposed check is the last check before disposing, to increase the likelihood that multiple callers will result in one of them succeeding.

* code style suggestions per AcK77

* add infinite wait for thread termination
2023-05-21 21:28:51 +02:00
..
Account Move solution and projects to src 2023-04-27 23:51:14 +02:00
Am AM: Stub some service calls (#4825) 2023-05-06 03:33:50 +02:00
Apm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Arp Move solution and projects to src 2023-04-27 23:51:14 +02:00
Audio Move solution and projects to src 2023-04-27 23:51:14 +02:00
Bgtc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Bluetooth Move solution and projects to src 2023-04-27 23:51:14 +02:00
BluetoothManager Move solution and projects to src 2023-04-27 23:51:14 +02:00
Caps Move solution and projects to src 2023-04-27 23:51:14 +02:00
Cec Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ectx Move solution and projects to src 2023-04-27 23:51:14 +02:00
Erpt Move solution and projects to src 2023-04-27 23:51:14 +02:00
Es Move solution and projects to src 2023-04-27 23:51:14 +02:00
Eupld Move solution and projects to src 2023-04-27 23:51:14 +02:00
Fatal Move solution and projects to src 2023-04-27 23:51:14 +02:00
Friend Move solution and projects to src 2023-04-27 23:51:14 +02:00
Fs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Grc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Hid Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ins Move solution and projects to src 2023-04-27 23:51:14 +02:00
Lbl Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ldn Move solution and projects to src 2023-04-27 23:51:14 +02:00
Loader Move solution and projects to src 2023-04-27 23:51:14 +02:00
Mig Move solution and projects to src 2023-04-27 23:51:14 +02:00
Mii Move solution and projects to src 2023-04-27 23:51:14 +02:00
Mm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Mnpp Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ncm Move solution and projects to src 2023-04-27 23:51:14 +02:00
News Move solution and projects to src 2023-04-27 23:51:14 +02:00
Nfc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ngct Move solution and projects to src 2023-04-27 23:51:14 +02:00
Nifm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Nim Move solution and projects to src 2023-04-27 23:51:14 +02:00
Notification Move solution and projects to src 2023-04-27 23:51:14 +02:00
Npns Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ns Move solution and projects to src 2023-04-27 23:51:14 +02:00
Nv Move solution and projects to src 2023-04-27 23:51:14 +02:00
Olsc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ovln Move solution and projects to src 2023-04-27 23:51:14 +02:00
Pcie Move solution and projects to src 2023-04-27 23:51:14 +02:00
Pctl Move solution and projects to src 2023-04-27 23:51:14 +02:00
Pcv Move solution and projects to src 2023-04-27 23:51:14 +02:00
Pm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Psc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ptm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ro Move solution and projects to src 2023-04-27 23:51:14 +02:00
Sdb Move solution and projects to src 2023-04-27 23:51:14 +02:00
Settings Move solution and projects to src 2023-04-27 23:51:14 +02:00
Sm Move solution and projects to src 2023-04-27 23:51:14 +02:00
Sockets Move solution and projects to src 2023-04-27 23:51:14 +02:00
Spl Move solution and projects to src 2023-04-27 23:51:14 +02:00
Srepo Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ssl Move solution and projects to src 2023-04-27 23:51:14 +02:00
SurfaceFlinger Move solution and projects to src 2023-04-27 23:51:14 +02:00
Time time: Update for 15.0.0 changes and fixes long standing issues (#4822) 2023-05-08 00:15:58 +02:00
Usb Move solution and projects to src 2023-04-27 23:51:14 +02:00
Vi Move solution and projects to src 2023-04-27 23:51:14 +02:00
Wlan Move solution and projects to src 2023-04-27 23:51:14 +02:00
CommandCmifAttribute.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
CommandTIpcAttribute.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableIpcService.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DummyService.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IpcService.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ServerBase.cs ServerBase thread safety (#4577) 2023-05-21 21:28:51 +02:00
ServiceAttributes.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00