Commit graph

16 commits

Author SHA1 Message Date
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