Commit graph

32 commits

Author SHA1 Message Date
GPUCode cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
Lioncash a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Weiyi Wang fd3cfd0ae0 ipc_helpers: silent signed comparison warning
index is only used as positive index in arrays. The warning is in DEBUG_ASSERT_MSG(index == TotalSize() ...)
2019-07-14 14:52:17 -04:00
Tobias 318095f9b9
Port yuzu-emu/yuzu#2249: "ipc_helpers: Allow pushing and popping floating-point values" (#4702)
Certain values that are passed through the IPC buffer are actually
floating point values, not solely integral values.
2019-06-09 16:03:22 +02:00
Weiyi Wang 05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang 5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang 7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
BreadFish64 74cd98ecad core: clean up warnings 2018-08-01 14:10:23 -05:00
wwylele aa02c50a2e Service/SOC: convert to ServiceFramework 2018-07-18 09:52:51 +03:00
Daniel Lim Wee Soong 968569aa61 Replace format specifiers for all usages of ASSERT_MSG 2018-03-27 23:28:42 +08:00
wwylele ea82203780
ipc_helper: remove interface for operating on command buffer directly
Now IPC helpers are only supposed to use on top of ServiceFramework
2018-03-10 13:37:05 +02:00
James Rowe f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
wwylele 54af348cfc IPC helpers: remove deprecated static buffer interface 2018-03-04 14:47:33 +02:00
wwylele 508bba2932 Service/NIM: convert to ServiceFramework 2018-03-03 19:25:26 +02:00
wwylele 61e5f320c9 ipc_helpers: remove some deprecated functions 2018-03-02 02:53:59 +02:00
wwylele e8c95a9a41 ipc_helpers: add PopPID; remove PushCurrentPIDHandle
It doesn't make sense for a service to tell its own PID to a client, and there is no such use case. Also the name "handle" is misleading as the PID is not a handle
2018-02-15 11:16:41 +02:00
Lioncash 91a804707b ipc_helpers: Add member functions for pushing and popping strongly typed enums
Alleviates the need to static_cast to an enum type at the call sites of the Push and Pop calls.

We only allow strongly typed enums, as they have a defined type of int
by default if an underlying type isn't explicitly specified, whereas
with regular enums, if an underlying type isn't specified, an
implementation-defined  type is used that can fit all the enumeration
values.
2017-12-10 23:10:00 -05:00
wwylele fda023c9fa ipc_helper: split PushMoveObjects and PushCopyObjects 2017-12-04 19:46:44 +02:00
wwylele cef6b15de4 IPC Helpers: Implement MappedBuffer translation helper for new interface 2017-12-03 00:05:20 +02:00
Subv c9c1ba0952 Kernel/IPC: Implement StaticBuffer translation for HLE services that use the HLERequestContext architecture.
The real kernel requires services to set up their static buffer targets ahead of time. This implementation does not require that and will simply create the storage for the buffers as they are processed in the incoming IPC request.

Static buffers are kept in an unordered_map keyed by their buffer id, and are written into the already-setup area of the request thread when responding an IPC request.

This fixes a regression (crash) introduced in #2992.

This PR introduces more warnings due to the [[deprecated]] attribute being added to void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id); and VAddr PopStaticBuffer(size_t* data_size);
2017-11-12 11:00:00 -05:00
Huw Pascoe a13ab958cb Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
Yuri Kunde Schlesner 92ca422088 Kernel: Allow clearing request_objects to re-use buffer space
Reduces the necessary allocation to max(in_handles, out_handles) rather
than (in_handles + out_handles).
2017-06-11 13:10:21 -07:00
Yuri Kunde Schlesner 21436f5ef7 IPC: Add Pop/PushObjects methods to RequestParser/Builder
These use the context functions to create and look-up handles for the
user.
2017-06-11 13:10:20 -07:00
Yuri Kunde Schlesner 1c4b0ebb1f IPC: Add basic HLERequestContext support to RequestParser/Builder 2017-06-11 13:10:16 -07:00
Yuri Kunde Schlesner be031989ee Kernel: Move HandleTable to a separate file 2017-05-29 17:34:39 -07:00
Lectem 12ed746477 IPCHelper Skip method + address comments for apt 2017-03-18 11:47:40 +01:00
Lectem 77f4fc473f fix #2560 and other comments 2017-03-18 10:44:01 +01:00
Lectem fb70c9683c move push out of class body and add u8 u16 bool specializations 2017-03-18 10:44:01 +01:00
Lectem 501e23ce59 refactor APT service to use the new IPC helpers 2017-03-18 10:44:01 +01:00
Lectem 2ee472b9c7 fix wwylele's comment and use typename in templates 2017-02-05 00:29:07 +01:00
Lectem f91c51467a move Pop methods out of class body 2016-12-26 14:42:06 +01:00
Lectem 8f2b642415 IPC helpers 2016-12-26 14:07:29 +01:00