Commit graph

21 commits

Author SHA1 Message Date
Lioncash
3d2d454c36 kernel: Remove unnecessary includes
Removes unnecessary direct dependencies in some headers and also gets
rid of indirect dependencies that were being relied on to be included.
2018-07-31 10:15:17 -04:00
James Rowe
ea88c44eb8 Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
Subv
4a8de6bb00 Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest. 2017-06-29 12:30:34 -05:00
Subv
44f4737f99 Kernel/Sessions: Clean up the list of pending request threads of a session when the client endpoint is closed. 2017-06-25 23:38:29 -05:00
Subv
d7538409fb Kernel/ServerSession: Keep track of which threads have issued sync requests. 2017-06-25 14:47:25 -05:00
Yuri Kunde Schlesner
5a6d4a2f19 Session: Remove/add some forward declarations 2017-06-08 00:33:57 -07:00
Yuri Kunde Schlesner
82a355b3cd Kernel: Ensure objects are kept alive during ClientSession disconnection
Fixes #2760
2017-06-08 00:33:24 -07:00
Yuri Kunde Schlesner
41a3feea66 HLE: Move SessionRequestHandler from Service:: to Kernel::
Most of the code that works with this is or will be in the kernel, so
it's a more appropriate place for it to be.
2017-06-05 23:40:11 -07:00
Yuri Kunde Schlesner
467545ed48 Kernel: Centralize error definitions in errors.h 2017-05-24 21:06:00 -07:00
Subv
8e4b05c22a Kernel/Sessions: Remove the ClientSession::Create function.
It is not meant to be used by anything other than CreateSessionPair.
2017-05-21 18:52:42 -05:00
Subv
f98eb7d315 Kernel: Remove a now unused enum and variable regarding a session's status. 2017-05-15 11:22:16 -05:00
Subv
9c496013b3 Kernel: Use a Session object to keep track of the status of a Client/Server session pair.
Reduce the associated port's connection count when a ServerSession is destroyed.
2017-05-15 11:22:15 -05:00
Subv
3e80a1a1c1 Fixed the codestyle to match our clang-format rules. 2016-12-14 12:45:36 -05:00
Subv
17d8d69c6e Added a framework for partially handling Session disconnections.
Further implementation will happen in a future commit.

Fixes a regression.
2016-12-08 15:01:10 -05:00
Subv
021e732815 Use std::move where appropriate. 2016-12-08 11:06:19 -05:00
Subv
977039e722 KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it. 2016-12-05 11:02:08 -05:00
Subv
4703561c9e Declare empty ServerSession and ClientSession constructors as default. 2016-12-02 22:58:02 -05:00
Subv
4c4f50dfaf Fixed the rebase mistakes. 2016-11-30 23:28:31 -05:00
Subv
4f2326c8a9 A bit of a redesign.
Sessions and Ports are now detached from each other.
HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class.
The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested.
File::OpenLinkFile now creates a new session pair and binds the File instance to it.
2016-11-30 23:12:35 -05:00
Subv
d2305d375f IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.
Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
2016-11-30 23:04:00 -05:00
Subv
302ef594a6 Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions.
Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed.

HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-11-30 23:02:05 -05:00