aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/server_session.h
AgeCommit message (Collapse)Author
2021-05-05hle: kernel: Migrate KSession, KClientSession, and KServerSession to ↵bunnei
KAutoObject.
2021-05-05hle: kernel: Refactor out various KThread std::shared_ptr usage.bunnei
2021-01-28core: hle: kernel: object: Implement Finalize() virtual method.bunnei
2021-01-28core: hle: kernel: Rename Thread to KThread.bunnei
2021-01-11core: hle: kernel: Update KSynchronizationObject.bunnei
2020-12-29hle: kernel: Move ServiceThread ownership to KernelCore.bunnei
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-28core: hle: server_session: Use separate threads for each service connection.bunnei
2020-09-14kernel: Remove all dependencies on the global system instanceLioncash
With this, the kernel finally doesn't depend directly on the global system instance anymore.
2020-04-17core: memory: Move to Core::Memory namespace.bunnei
- helpful to disambiguate Kernel::Memory namespace.
2020-02-11Kernel: Refactor synchronization to better match REFernando Sahmkow
2020-02-11Kernel: Change WaitObject to Synchronization object. In order to better ↵Fernando Sahmkow
reflect RE.
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei
2019-11-26core: Prepare various classes for memory read/write migrationLioncash
Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us.
2019-11-24kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for ↵bunnei
kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
2019-04-11kernel: Make handle type declarations constexprLioncash
Some objects declare their handle type as const, while others declare it as constexpr. This makes the const ones constexpr for consistency, and prevent unexpected compilation errors if these happen to be attempted to be used within a constexpr context.
2019-04-06kernel/server_session: Return a std::pair from CreateSessionPair()Lioncash
Keeps the return type consistent with the function name. While we're at it, we can also reduce the amount of boilerplate involved with handling these by using structured bindings.
2019-04-05Merge pull request #2325 from lioncash/namebunnei
kernel/server_session: Provide a GetName() override
2019-04-03kernel/server_session: Provide a GetName() overrideLioncash
Given server sessions can be given a name, we should allow retrieving it instead of using the default implementation of GetName(), which would just return "[UNKNOWN KERNEL OBJECT]".
2019-04-01kernel/wait_object: Make ShouldWait() take thread members by pointer-to-constLioncash
Given this is intended as a querying function, it doesn't make sense to allow the implementer to modify the state of the given thread.
2019-03-05kernel/server_session: Make data members privateLioncash
Makes it much nicer to locally reason about server session behavior, as part of its functionality isn't placed around other classes.
2018-12-31core/kernel: Remove unnecessary inclusionsLioncash
Gets rid of a few unnecessary header dependencies in some source files.
2018-08-28kernel: Eliminate kernel global stateLioncash
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
2018-08-15kernel/server_session: Add IsSession() member functionLioncash
Allows querying the inverse of IsDomain() to make things more readable. This will likely also be usable in the event of implementing ConvertDomainToSession().
2018-08-01kernel: Move object class to its own source filesLioncash
General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
2018-07-31kernel: Remove unnecessary includesLioncash
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
2018-02-18 Kernel/IPC: Add a small delay after each SyncRequest to prevent thread ↵Subv
starvation. Ported from citra PR #3091 The delay specified here is from a Nintendo 3DS, and should be measured in a Nintendo Switch. This change is enough to prevent Puyo Puyo Tetris's main thread starvation.
2018-01-24hle: Integrate Domain handling into ServerSession.bunnei
2018-01-20Format: Run the new clang format on everythingJames Rowe
2017-12-29kernel: Fix implementation of ConvertSessionToDomain.bunnei
2017-10-15hle: Implement ConvertSessionToDomain, various cleanups.bunnei
2017-06-25Kernel/ServerSession: Keep track of which threads have issued sync requests.Subv
2017-06-08Session: Remove/add some forward declarationsYuri Kunde Schlesner
2017-06-06Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSessionYuri Kunde Schlesner
This allows attaching a HLE handle to a ServerPort at any point after it is created, allowing port/session creation to be generic between HLE and regular services.
2017-06-05HLE: Move SessionRequestHandler from Service:: to Kernel::Yuri Kunde Schlesner
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-05-29Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner
2017-05-29Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
2017-05-15Kernel: Use a Session object to keep track of the status of a Client/Server ↵Subv
session pair. Reduce the associated port's connection count when a ServerSession is destroyed.
2017-02-26Doxygen: Amend minor issues (#2593)Mat M
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-02-26Core: Remove unnecessary include in thread.hYuri Kunde Schlesner
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv
This will be useful when implementing mutex priority inheritance.
2016-12-14Fixed the codestyle to match our clang-format rules.Subv
2016-12-09Moved the HLE command buffer translation task to ServerSession instead of ↵Subv
the HLE handler superclass.
2016-12-08Use std::move where appropriate.Subv
2016-12-05KServerPorts now have an HLE handler "template", which is inherited by all ↵Subv
ServerSessions created from it.
2016-11-30Fixed the rebase mistakes.Subv
2016-11-30A bit of a redesign.Subv
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-30fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block ↵Subv
of Inter Process Communication.
2016-11-30 Kernel/IPC: Use Ports and Sessions as the fundamental building block of ↵Subv
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.