summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_server_session.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-23k_server_session: process for guest serversLiam1-4/+11
2023-04-30kernel: remove general boost listsLiam1-3/+4
2023-03-13kernel: remove kernel_Liam1-1/+1
2023-03-13kernel: convert KPort, KSessionLiam1-7/+5
2023-03-01service: move hle_ipc from kernelLiam1-5/+7
2022-10-31k_server_session: add SendReplyHLELiam1-0/+4
2022-10-31kernel: invert session request handling flowLiam1-32/+5
2022-10-30k_server_session: fix crashesLiam1-1/+1
2022-10-19kernel: remove most SessionRequestManager handling from KServerSessionLiam1-33/+0
2022-10-19kernel: add KSessionRequestLiam1-4/+4
2022-10-12k_server_session: preliminary support for userspace server sessionsLiam1-15/+22
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-6/+6
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2021-11-04core: Remove unused includesameerj1-3/+0
2021-06-10hle: kernel: KServerSession: Fix client disconnected.bunnei1-6/+5
- Prevents a cloned session's handler from being overwritten by another disconnected session. - Fixes session handler nullptr asserts with Pokemon Sword & Shield.
2021-06-07hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree.bunnei1-1/+1
- Fixes some crashes introduced by our common intrusive red/black tree impl.
2021-06-05hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei1-14/+3
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-05-29kernel: Add missing override specifiersLioncash1-3/+3
Over the course of the kernel refactoring a tiny bit of missing overrides slipped through review, so we can add these. While we're at it, we can remove redundant virtual keywords where applicable as well.
2021-05-21hle: kernel: Implement CloneCurrentObject and improve session management.bunnei1-14/+22
2021-05-08kernel: Eliminate variable shadowingLioncash1-1/+1
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases.
2021-05-06fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei1-2/+2
2021-05-06hle: kernel: Remove deprecated Object class.bunnei1-18/+0
2021-05-06hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-1/+4
2021-05-06hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei1-43/+30
2021-05-06hle: kernel: Refactor out various KThread std::shared_ptr usage.bunnei1-12/+2
2021-01-29core: hle: kernel: object: Implement Finalize() virtual method.bunnei1-0/+2
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei1-5/+5
2021-01-11core: hle: kernel: Update KSynchronizationObject.bunnei1-8/+4
2020-12-29hle: kernel: Move ServiceThread ownership to KernelCore.bunnei1-1/+1
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-29core: hle: server_session: Use separate threads for each service connection.bunnei1-6/+6
2020-09-14kernel: Remove all dependencies on the global system instanceLioncash1-4/+7
With this, the kernel finally doesn't depend directly on the global system instance anymore.
2020-04-17core: memory: Move to Core::Memory namespace.bunnei1-3/+3
- helpful to disambiguate Kernel::Memory namespace.
2020-02-11Kernel: Refactor synchronization to better match REFernando Sahmkow1-0/+2
2020-02-11Kernel: Change WaitObject to Synchronization object. In order to better reflect RE.Fernando Sahmkow1-2/+2
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei1-26/+23
2019-11-27core: Prepare various classes for memory read/write migrationLioncash1-1/+8
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-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei1-10/+10
* 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 constexprLioncash1-1/+1
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()Lioncash1-1/+2
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-03kernel/server_session: Provide a GetName() overrideLioncash1-0/+4
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-02kernel/wait_object: Make ShouldWait() take thread members by pointer-to-constLioncash1-1/+1
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-06kernel/server_session: Make data members privateLioncash1-15/+38
Makes it much nicer to locally reason about server session behavior, as part of its functionality isn't placed around other classes.
2019-01-01core/kernel: Remove unnecessary inclusionsLioncash1-1/+0
Gets rid of a few unnecessary header dependencies in some source files.
2018-08-29kernel: Eliminate kernel global stateLioncash1-5/+9
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 functionLioncash1-1/+6
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-02kernel: Move object class to its own source filesLioncash1-1/+1
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 includesLioncash1-2/+2
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 starvation.Subv1-9/+5
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-25hle: Integrate Domain handling into ServerSession.bunnei1-1/+17
2018-01-21Format: Run the new clang format on everythingJames Rowe1-1/+1
2017-12-29kernel: Fix implementation of ConvertSessionToDomain.bunnei1-10/+0
2017-10-15hle: Implement ConvertSessionToDomain, various cleanups.bunnei1-0/+10
2017-06-25Kernel/ServerSession: Keep track of which threads have issued sync requests.Subv1-2/+12
2017-06-08Session: Remove/add some forward declarationsYuri Kunde Schlesner1-1/+1
2017-06-06Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSessionYuri Kunde Schlesner1-8/+12
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-06HLE: Move SessionRequestHandler from Service:: to Kernel::Yuri Kunde Schlesner1-5/+4
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-30Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner1-1/+1
2017-05-30Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner1-0/+1
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 session pair.Subv1-3/+9
Reduce the associated port's connection count when a ServerSession is destroyed.
2017-02-27Doxygen: Amend minor issues (#2593)Mat M1-1/+2
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-27Core: Remove unnecessary include in thread.hYuri Kunde Schlesner1-0/+1
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv1-2/+2
This will be useful when implementing mutex priority inheritance.
2016-12-14Fixed the codestyle to match our clang-format rules.Subv1-10/+15
2016-12-09Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass.Subv1-0/+10
2016-12-08Use std::move where appropriate.Subv1-1/+3
2016-12-05KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.Subv1-15/+15
2016-12-01Fixed the rebase mistakes.Subv1-3/+6
2016-12-01A bit of a redesign.Subv1-159/+8
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-12-01fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv1-1/+1
2016-12-01 Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv1-33/+40
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-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-2/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-25/+36
2016-08-02fix #1942 and adds a few IPC functions for descriptorsLectem1-15/+103
2016-05-31Fix parameter name in EnableNotificationmailwl1-0/+4
2016-03-21session: Make helper functions constexprLioncash1-6/+6
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot1-0/+6
2015-06-23Add helpers to create IPC command buffer headers and descriptorsYuri Kunde Schlesner1-0/+34
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+1
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-11Core/Memory: Give every emulated thread it's own TLS area.Subv1-3/+7
The TLS area for thread T with id Ti is located at TLS_AREA_VADDR + (Ti - 1) * 0x200. This allows some games like Mario Kart 7 to continue further.
2015-05-09Memory: Re-organize and rename memory area address constantsYuri Kunde Schlesner1-1/+1
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift1-1/+1
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-02-02Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner1-0/+4
This should speed up compile times a bit, as well as enable more liberal use of forward declarations. (Due to SharedPtr not trying to emit the destructor anymore.)
2015-01-22Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.bunnei1-4/+4
2015-01-22WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.bunnei1-3/+8
2015-01-22Session: Change to a WaitObject.bunnei1-1/+7
2014-12-28Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner1-2/+2
2014-12-21License changepurpasmart961-1/+1
2014-12-15Remove SyncRequest from K::Object and create a new K::Session typeYuri Kunde Schlesner1-0/+58
This is a first step at fixing the conceptual insanity that is our handling of service and IPC calls. For now, interfaces still directly derived from Session because we don't have the infrastructure to do it properly. (That is, Processes and scheduling them.)