summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vi: manage resources independently of nvnflinger and refactorLiam2024-02-181-10/+0
|
* nvnflinger: convert to processLiam2024-02-181-11/+0
|
* service: add template serializer for method callsLiam2024-01-251-0/+16
|
* sockets: avoid locking around socket session callsLiam2023-08-201-2/+2
|
* core: service: Add FunctionInfoTyped to allow expanding existing interfacesgerman772023-04-261-8/+12
|
* nvnflinger: fix nameLiam2023-03-011-5/+5
|
* service: move hle_ipc from kernelLiam2023-03-011-11/+9
|
* service: refactor server architectureLiam2023-02-211-17/+2
| | | | Converts services to have their own processes
* kernel: invert session request handling flowLiam2022-10-311-0/+4
|
* core: barrier service thread shutdownLiam2022-10-231-0/+2
|
* core: Replace all instances of ResultCode with Resultgerman772022-06-271-2/+2
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-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.
* hle: kernel: Use std::mutex instead of spin locks for most kernel locking.bunnei2022-04-121-3/+2
|
* hle: service: Add option for service interfaces to create or use the default thread.bunnei2022-04-021-5/+9
|
* hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei2022-03-251-1/+3
|
* hle: service: sm: Refactor to better manage ports.bunnei2021-07-211-1/+1
|
* hle: service: Add a helper module for managing kernel objects.bunnei2021-07-211-2/+3
|
* hle: service: sm: Remove redundant session reservation, etc.bunnei2021-06-101-1/+4
| | | | - We were double-reserving, causing us to run out of sessions in Pokemon Sword & Shield.
* hle: service: Increase arbitrary max sessions limit.bunnei2021-06-101-4/+1
| | | - Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
* hle: service: Use correct size for ServerSessionCountMax.bunnei2021-06-101-4/+6
|
* hle: kernel: KServerSession: Fix client disconnected.bunnei2021-06-101-1/+1
| | | | | - Prevents a cloned session's handler from being overwritten by another disconnected session. - Fixes session handler nullptr asserts with Pokemon Sword & Shield.
* hle: service: Increase arbitrary max sessions limit.bunnei2021-06-091-1/+1
| | | - Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
* hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei2021-06-051-2/+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.
* core: Make variable shadowing a compile-time errorLioncash2021-05-161-6/+6
| | | | | | Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
* hle: service: Add support for dispatching TIPC requests.bunnei2021-05-111-1/+23
|
* hle: service: Implement IPC::CommandType::Close.bunnei2021-05-111-1/+2
| | | | - This was not actually closing sessions before.
* hle: kernel: Implement named service ports using service interface factory.bunnei2021-05-111-3/+5
| | | | - This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
* hle: kernel: Remove deprecated Object class.bunnei2021-05-061-1/+0
|
* hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei2021-05-061-4/+1
|
* hle: service: Acquire and release a lock on requests.bunnei2020-12-291-4/+12
| | | | - This makes it such that we can safely access service members from CoreTiming thread.
* service: Eliminate usages of the global system instanceLioncash2020-11-271-5/+13
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei2020-11-241-5/+16
| | | | | | * hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
* service: Remove two usages of the global system accessorLioncash2020-09-071-2/+2
| | | | Removes more instances of reliance on global state.
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-1/+1
| | | | | | * 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.
* services: Pass FileSystemController as reference to services that need itZach Hilman2019-09-211-4/+4
|
* fsp-srv: Implement OutputAccessLogToSdCardZach Hilman2019-06-291-2/+1
| | | | Allows games to log data to the SD.
* core: Add missing override specifiers where applicableLioncash2019-04-041-1/+1
| | | | | | | | | Applies the override specifier where applicable. In the case of destructors that are defaulted in their definition, they can simply be removed. This also removes the unnecessary inclusions being done in audin_u and audrec_u, given their close proximity.
* core_timing: Convert core timing into a classLioncash2019-02-161-5/+10
| | | | | | | | | | | Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
* Fix Service object leak on emulation stopJens Schmer2018-12-131-5/+3
| | | | | | Services created with the ServiceFramework base class install themselves as HleHandlers with an owning shared_ptr in the ServerPort ServiceFrameworkBase::port member variable, creating a cyclic ownership between ServiceFrameworkBase and the ServerPort, preventing deletion of the service objects. Fix that by removing the ServiceFrameworkBase::port member because that was only used to detect multiple attempts at installing a port. Instead store a flag if the port was already installed to achieve the same functionality.
* filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by referenceLioncash2018-10-131-2/+1
| | | | | | | Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-3/+3
|
* service: Migrate global named port map to the KernelCore classLioncash2018-09-021-7/+0
| | | | | | Now that we have a class representing the kernel in some capacity, we now have a place to put the named port map, so we move it over and get rid of another piece of global state within the core.
* vfs: Make type hierarchy objects classes instead of structsLioncash2018-08-121-1/+1
| | | | | | struct should be used when the data type is very simple or otherwise has no invariants associated with it. Given these are used to form a hierarchy, class should be used instead.
* core: Port core to VfsFilesystem for file accessZach Hilman2018-08-091-1/+6
|
* kernel: Move object class to its own source filesLioncash2018-08-021-2/+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.
* core: Make converting constructors explicit where applicableLioncash2018-07-241-1/+1
| | | | | Avoids unwanted implicit conversions. Thankfully, given the large amount of cleanup in past PRs, only this tiny amount is left over to cover.
* core: Relocate g_service_manager to the System classLioncash2018-04-211-1/+1
| | | | | Converts the service manager from a global into an instance-based variable.
* Format: Run the new clang format on everythingJames Rowe2018-01-211-2/+2
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* kernel: Fix implementation of ConvertSessionToDomain.bunnei2017-12-291-1/+1
|
* service: Return proper result code for IPC::CommandType::Close.bunnei2017-11-011-1/+1
|
* service: Add CreatePort function (that does not register/install).bunnei2017-10-191-0/+2
|
* hle: Initial implementation of NX service framework and IPC.bunnei2017-10-151-80/+4
|
* Service: Add new ServiceFramework framework for writing HLE servicesYuri Kunde Schlesner2017-06-081-0/+150
| | | | | | | | | | | | The old "Interface" class had a few problems such as using free functions (Which didn't allow you to write the service handler as if it were a regular class.) which weren't very extensible. (Only received one parameter with a pointer to the Interface object.) The new ServiceFramework aims to solve these problems by working with member functions and passing a generic context struct as parameter. This struct can be extended in the future without having to update all existing service implementations.
* Service: Remove unnecessary includes from service.hYuri Kunde Schlesner2017-06-061-5/+7
| | | | | This has a huge fallout in terms of needing to fix other files because all service implementations included that file.
* Service: Make service registration part of the sm implementationYuri Kunde Schlesner2017-06-061-2/+0
| | | | Also enhances the GetServiceHandle implementation to be more accurate.
* HLE: Move SessionRequestHandler from Service:: to Kernel::Yuri Kunde Schlesner2017-06-061-43/+2
| | | | | 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.
* Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner2017-05-301-1/+0
|
* IPC helpers exampleLectem2016-12-261-0/+1
|
* Fixed the codestyle to match our clang-format rules.Subv2016-12-141-8/+13
|
* Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass.Subv2016-12-091-20/+10
|
* Added a framework for partially handling Session disconnections.Subv2016-12-081-0/+18
| | | | | | Further implementation will happen in a future commit. Fixes a regression.
* Use std::move where appropriate.Subv2016-12-081-156/+3
|
* HLE: Use a member variable instead of a virtual function to retrieve the max number of sessions that can be connected to an HLE service at the same time.Subv2016-12-051-5/+13
|
* Split SessionRequestHandler::HandleSyncRequest into HandleSyncRequest, TranslateRequest and HandleSyncRequestImpl.Subv2016-12-051-6/+22
| | | | HandleSyncRequest now takes care of calling the command buffer translate function before actually invoking the command handler for HLE services.
* KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.Subv2016-12-051-4/+10
|
* Fixed the rebase mistakes.Subv2016-12-011-25/+25
|
* A bit of a redesign.Subv2016-12-011-5/+174
| | | | | | | 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.
* IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.Subv2016-12-011-1/+1
| | | | Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
* Kernel/HLE: Service::Interface no longer inherits from any Kernel object, and is now its own standalone class.Subv2016-12-011-8/+4
| | | | Interface is now used by aggregation in ClientPort, to forward service commands to their HLE implementation if needed.
* fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv2016-12-011-1/+1
|
* Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv2016-12-011-5/+16
| | | | | | | 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.
* Set client SDK version to Service APIsmailwl2016-11-301-0/+12
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+0
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-5/+5
|
* Core: Cleanup file_sys includes.Emmanuel Gil Peyrot2015-06-281-0/+2
|
* Common: Cleanup key_map includes.Emmanuel Gil Peyrot2015-06-281-1/+0
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-1/+1
|
* De-inline functions from Interface, removing them from service.hYuri Kunde Schlesner2015-04-141-50/+5
| | | | This reduces the time for a full recompile from 65.43s to 59.53s (~9%)
* Services: Moved the PTM and APT services to their own folderSubv2015-03-041-0/+3
| | | | | | This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs. Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
* Service: Store function names as const char* instead of std::stringYuri Kunde Schlesner2015-02-021-6/+6
| | | | | Uses less memory (strings and function table is stored in constant data) and speeds up start up (no need to allocate and copy strings).
* Service: Clean-up InterfaceYuri Kunde Schlesner2015-02-021-22/+9
|
* Make Port/Service registration and querying more HW-accurateYuri Kunde Schlesner2015-02-021-24/+6
|
* Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.archshift2015-01-101-11/+20
|
* Fix double-free in Service manager during shutdownYuri Kunde Schlesner2015-01-071-11/+4
| | | | Fixes #423.
* Kernel: New handle managerYuri Kunde Schlesner2014-12-281-2/+3
| | | | | | | | | | | This handle manager more closely mirrors the behaviour of the CTR-OS one. In addition object ref-counts and support for DuplicateHandle have been added. Note that support for DuplicateHandle is still experimental, since parts of the kernel still use Handles internally, which will likely cause troubles if two different handles to the same object are used to e.g. wait on a synchronization primitive.
* Rename ObjectPool to HandleTableYuri Kunde Schlesner2014-12-281-2/+2
|
* License changepurpasmart962014-12-211-1/+1
|
* Remove SyncRequest from K::Object and create a new K::Session typeYuri Kunde Schlesner2014-12-151-18/+8
| | | | | | | 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.)
* Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-131-7/+1
|
* Log the cmd_buff arguments when citra comes across an unimplemented functionarchshift2014-11-251-12/+12
|
* Remove duplicated docs/update them for changed parameters.Yuri Kunde Schlesner2014-11-241-10/+0
|
* HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner2014-11-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed.
* Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-191-7/+7
|
* Add `override` keyword through the code.Yuri Kunde Schlesner2014-10-261-5/+5
| | | | This was automated using `clang-modernize`.
* core: Pass string by reference in FetchFromPortName and DeleteServiceLioncash2014-09-061-2/+2
|
* Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash2014-08-181-5/+5
| | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
* Merge branch 'threading' of https://github.com/bunnei/citrabunnei2014-06-141-10/+30
|\ | | | | | | | | | | Conflicts: src/core/hle/function_wrappers.h src/core/hle/service/gsp.cpp
| * HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei2014-06-131-1/+1
| |
| * Kernel: Updated several member functions to be constbunnei2014-06-131-2/+2
| |
| * service: added a error log messages for unimplemented WaitSynchronizationbunnei2014-06-051-0/+1
| |
| * service: cleaned up log messagesbunnei2014-05-301-2/+2
| |
| * service: added additional hack to return success on unimplemented service callsbunnei2014-05-301-2/+10
| |
| * service: changed interface to return 0 (no error) when a service method is unimplemented - hack to make apps boot furtherbunnei2014-05-291-2/+2
| |
| * kernel: added WaitSynchronization method to Kernel::Objectbunnei2014-05-271-0/+10
| |
| * kernel: updated SyncRequest to take boolean thread wait result as a parameterbunnei2014-05-271-3/+4
| |
| * service: Renamed Sync to SyncRequestbunnei2014-05-271-1/+1
| |
* | service: fixed typo that MSVC did not catch as an errorbunnei2014-05-231-1/+1
|/
* service: removed redundant include of common_types.hbunnei2014-05-211-1/+0
|
* renamed "syscall" module to "svc" (more accurate naming)bunnei2014-05-211-1/+1
|
* - created a Kernel namespacebunnei2014-05-211-6/+6
| | | | | - cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles
* - renamed NewHandle to CreateHandlebunnei2014-05-191-5/+7
| | | | - updated CreateHandle/DeleteHandle to use KernelObject's
* - updated service(s) to be KernelObject'sbunnei2014-05-191-36/+15
| | | | - various cleanups
* renamed "UID" to "Handle" where appropriatebunnei2014-05-191-12/+10
|
* - moved Handle/Result definitions to kernel.hbunnei2014-05-191-5/+7
| | | | - added ResetType enum
* - removed HLE mem "hack" and replaced with kernel mem regionbunnei2014-05-081-1/+11
| | | | | - added a helper function for getting command buffer for services - fixed bug where GSP DMA was incorrectly being done in DataSynchronizationBarrier (instead of gsp_TriggerCmdReqQueue)
* fixed weird spacingbunnei2014-04-281-1/+1
|
* - refactored how service functions are calledbunnei2014-04-251-8/+32
| | | | - added option to create/delete service handles
* - added stubbed out GSP::Gpu service interfacebunnei2014-04-161-4/+6
| | | | - various cleanups/refactors to HLE services
* restructured hle:services completely to use function lookup tablesbunnei2014-04-161-2/+26
|
* - extracted srv: calls from service.cpp and put in its own modulebunnei2014-04-161-8/+11
| | | | | - added function tables for service calls - lots of refactoring
* added framework for APT service (application and title launching service)bunnei2014-04-131-0/+1
|
* cleanups to service HLEbunnei2014-04-131-2/+2
|
* - added HLE to connect to "srv:" servicebunnei2014-04-131-2/+55
| | | | | | - added a manager for keeping track of services/ports - added a memory mapped region for memory accessed by HLE - added HLE for GetThreadCommandBuffer function
* - renamed hle_syscall to just syscallbunnei2014-04-121-0/+60
- added service.h as an initial service interface