summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ipc_helpers.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-04-30kernel: match calls to Register and UnregisterLiam1-0/+1
2023-03-13kernel: convert KPort, KSessionLiam1-1/+1
2023-03-07hle: rename legacy errors to ResultsLiam1-1/+1
2023-03-01service: move hle_ipc from kernelLiam1-6/+6
2023-02-21service: refactor server architectureLiam1-3/+9
Converts services to have their own processes
2023-02-14general: rename CurrentProcess to ApplicationProcessLiam1-1/+1
2022-11-10kernel/svc_types: refreshLiam1-1/+1
2022-10-31kernel: invert session request handling flowLiam1-9/+8
2022-10-22ipc_helpers: Ignore GCC compiler warnings only on GCCMorph1-2/+2
Clang and ICC for whatever reason also defines __GNUC__. Exclude them from this check.
2022-10-19kernel: remove most SessionRequestManager handling from KServerSessionLiam1-5/+6
2022-10-12k_server_session: preliminary support for userspace server sessionsLiam1-1/+2
2022-07-27chore: make yuzu REUSE compliantAndrea Pappacoda1-3/+2
[REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-5/+5
2022-03-15core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager.bunnei1-1/+1
2022-02-05hle: ipc_helpers: Ignore -Wclass-memaccessMorph1-0/+8
This warning is triggered by GCC when copying into non-trivially default constructible types, as it uses the more restrictive std::is_trivial (which includes std::is_trivially_default_constructible) to determine whether memcpy is safe instead of std::is_trivially_copyable.
2021-10-07service: Reduce header include overheadMorph1-3/+0
2021-06-25hle: hle_helpers: Skip data payload offset checks on TIPC requests.bunnei1-2/+6
- TIPC does not use this.
2021-05-21hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects.bunnei1-20/+0
2021-05-21hle: kernel: Implement CloneCurrentObject and improve session management.bunnei1-10/+13
2021-05-21Revert "WORKAROUND: temp. disable session resource limits while we work out issues"bunnei1-2/+2
This reverts commit fc086f93b2165b5c210cb7dcd6c18ebe17f1fd7b.
2021-05-16core: Make variable shadowing a compile-time errorLioncash1-9/+9
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.
2021-05-11hle: kernel: hle_ipc: Fix outgoing IPC response size calculation.bunnei1-0/+1
2021-05-11WORKAROUND: temp. disable session resource limits while we work out issuesbunnei1-2/+2
2021-05-11core: hle: ipc_helpers: Fix cast on raw_data_size calculation.bunnei1-1/+1
2021-05-11hle: ipc_helpers: Reserve session resource when we create a KSession.bunnei1-0/+5
2021-05-11hle: ipc_helpers: Update IPC response generation for TIPC.bunnei1-17/+31
2021-05-08kernel: Eliminate variable shadowingLioncash1-10/+10
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases.
2021-05-06hle: kernel: Remove deprecated Object class.bunnei1-17/+0
2021-05-06hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-2/+2
2021-05-06hle: kernel: Migrate KClientPort to KAutoObject.bunnei1-1/+1
2021-05-06hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei1-6/+6
2021-05-06hle: ipc_helpers: Add methods for copy/move references.bunnei1-2/+24
2021-05-06hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei1-10/+10
2020-12-07hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cppcomex1-32/+35
- Add a type check so that calling Push with an invalid type produces a compile error rather than a linker error. - vi.cpp was calling Push with a variable of type `std::size_t`. There's no explicit overload for `size_t`, but there is one for `u64`, which on most platforms is the same type as `size_t`. On macOS, however, it isn't: both types are 64 bits, but `size_t` is `unsigned long` and `u64` is `unsigned long long`. Regardless, it makes more sense to explicitly use `u64` here instead of `size_t`.
2020-11-08ipc_helpers: Remove usage of the global system instanceLioncash1-6/+3
Resolves numerous deprecation warnings throughout the codebase due to inclusion of this header. Now building core should be significantly less noisy (and also relying on less global state). This also uncovered quite a few modules that were relying on indirect includes, which have also been fixed.
2020-10-21Revert "core: Fix clang build"bunnei1-2/+2
2020-10-18core: Fix clang buildLioncash1-2/+2
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-13core/CMakeLists: Make some warnings errorsLioncash1-9/+10
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-08-05ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()Lioncash1-0/+4
It's undefined behavior to use non-trivially copyable objects with std::memcpy, so we can add asserts to catch usages of these at compile-time.
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei1-3/+3
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei1-8/+8
* 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-05-19ipc_helpers: Amend floating-point type in Pop<double> specializationLioncash1-1/+1
Currently, this overload isn't used, so this wasn't actually hit in any code, only the float overload is used.
2019-04-06kernel/server_session: Return a std::pair from CreateSessionPair()Lioncash1-3/+1
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-03-16ipc_helpers: Allow pushing and popping floating-point valuesLioncash1-0/+30
Certain values that are passed through the IPC buffer are actually floating point values, not solely integral values.
2019-03-10core/hle/result: Relocate IPC error code to ipc_helpersLioncash1-0/+3
Relocates the error code to where it's most related, similar to how all the other error codes are. Previously we were including a non-generic error in the main result code header.
2019-03-08kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optionalLioncash1-1/+1
There's no real need to use a shared lifetime here, since we don't actually expose them to anything else. This is also kind of an unnecessary use of the heap given the objects themselves are so small; small enough, in fact that changing over to optionals actually reduces the overall size of the HLERequestContext struct (818 bytes to 808 bytes).
2019-02-27core/ipc_helper: Allow popping all signed value types with RequestParserLioncash1-0/+15
There's no real reason this shouldn't be allowed, given some values sent via a request can be signed. This also makes it less annoying to work with popping enum values, given an enum class with no type specifier will work out of the box now. It's also kind of an oversight to allow popping s64 values, but nothing else.
2019-01-30hle/ipc_helpers: Fix clang-format warningsLioncash1-1/+0
2019-01-29hle/ipc_helpers: Allow pushing signed valuesLioncash1-0/+22
This is kind of a large hole in the API, given we allow popping signed values. This fixes that.
2019-01-01core/kernel: Remove unnecessary inclusionsLioncash1-1/+1
Gets rid of a few unnecessary header dependencies in some source files.
2018-10-30hle_ipc: Add member function for querying the existence of a domain headerLioncash1-2/+1
Gets rid of the need to call the getter and then check for null.
2018-09-19Removed MakeBuilder as it's not needed anymoreDavid Marcec1-7/+0
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-6/+6
2018-08-29kernel: Eliminate kernel global stateLioncash1-1/+4
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-02kernel: Move object class to its own source filesLioncash1-2/+5
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-24ipc_helper: Add helper member function for popping enum values to RequestParserLioncash1-0/+8
2018-07-24hle_ipc: Make constructors explicit where applicableLioncash1-11/+12
2018-07-24ipc_helpers: Make member variables of ResponseBuilder privateLioncash1-5/+6
These aren't used externally at all, so they can be made private.
2018-07-20ipc_helpers: Add PushEnum() member function to ResponseBuilderLioncash1-0/+19
Allows pushing strongly-typed enum members without the need to always cast them at the call sites. Note that we *only* allow strongly-typed enums in this case. The reason for this is that strongly typed enums have a guaranteed defined size, so the size of the data being pushed is always deterministic. With regular enums this can be a little more error-prone, so we disallow them. This function simply uses the underlying type of the enum to determine the size of the data. For example, if an enum is defined as: enum class SomeEnum : u16 { SomeEntry }; if PushEnum(SomeEnum::SomeEntry); is called, then it will push a u16-size amount of data.
2018-05-02ipc: Add support for PopIpcInterface() method.bunnei1-0/+7
- This can be used for domain objects as inputs to service functions.
2018-02-20Fix: change check for domain order and existance of domain message headermailwl1-1/+2
2018-02-20IPC: add domain header to response if only it exists in requestmailwl1-1/+1
2018-01-25ResponseBuilder: Use a bit field for customizing instead of always_move_handles.bunnei1-9/+18
2018-01-25hle: Rename RequestBuilder to ResponseBuilder.bunnei1-20/+21
2018-01-25ipc_helpers: Make interface domain agnostic and add header validation.bunnei1-24/+46
2018-01-25hle: Integrate Domain handling into ServerSession.bunnei1-3/+3
2018-01-25hle: Remove Domain and SyncObject kernel objects.bunnei1-1/+0
2018-01-22IPC: Don't create an unnecessary port when using PushIpcInterface outside of a domain.Subv1-4/+5
2018-01-21fsp_srv: Various improvements to IStorage:Read implementation.bunnei1-0/+5
2018-01-18Stub PopLaunchParameter and implement Buffer C Descriptors reading on hle_ipc (#96)gdkchan1-0/+4
* Stub PopLaunchParameter and implement Buffer C Descriptors reading * Address PR feedback * Ensure we push a u64 not a size_t * Fix formatting
2018-01-17IPC: Push domain objects as move handles when not in a domain.Subv1-2/+20
2018-01-11IPC: Allow passing arguments to the Interfaces when using PushIpcInterfaceSubv1-3/+3
2018-01-07IPC: Take the number of domain objects as a parameter in MakeBuilder.Subv1-2/+4
2018-01-07IPC: Fixed pushing ResultCodes into the command buffer.Subv1-5/+7
They should have 32 bits of padding after the error code now.
2018-01-07IPC: Add functions to read the input move/copy objects from an IPC request.Subv1-0/+16
2018-01-07IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.Subv1-215/+25
Popping objects from the buffer is still not implemented.
2018-01-07IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.Subv1-5/+14
Domain object ids are always stored immediately after the raw data.
2017-12-29kernel: Fix implementation of ConvertSessionToDomain.bunnei1-0/+14
2017-10-18ipc_helpers: Fix alignment (was wrong as a result of a dynarmic bug).bunnei1-3/+4
2017-10-15hle: Implement ConvertSessionToDomain, various cleanups.bunnei1-1/+1
2017-10-15hle: Initial implementation of NX service framework and IPC.bunnei1-71/+51
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-6/+6
2017-06-11Kernel: Allow clearing request_objects to re-use buffer spaceYuri Kunde Schlesner1-0/+3
Reduces the necessary allocation to max(in_handles, out_handles) rather than (in_handles + out_handles).
2017-06-11IPC: Add Pop/PushObjects methods to RequestParser/BuilderYuri Kunde Schlesner1-10/+103
These use the context functions to create and look-up handles for the user.
2017-06-11IPC: Add basic HLERequestContext support to RequestParser/BuilderYuri Kunde Schlesner1-1/+32
2017-05-30Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner1-0/+2
2017-03-18IPCHelper Skip method + address comments for aptLectem1-1/+7
2017-03-18fix #2560 and other commentsLectem1-2/+2
2017-03-18move push out of class body and add u8 u16 bool specializationsLectem1-46/+106
2017-03-18refactor APT service to use the new IPC helpersLectem1-0/+12
2017-02-05fix wwylele's comment and use typename in templatesLectem1-4/+4
2016-12-26move Pop methods out of class bodyLectem1-72/+88
2016-12-26IPC helpersLectem1-0/+259