Lioncash
ff500a7b68
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
This introduces a slightly more generic variant of WriteBuffer().
Notably, this variant doesn't constrain the arguments to only accepting
std::vector instances. It accepts whatever adheres to the
ContiguousContainer concept in the C++ standard library.
This essentially means, std::array, std::string, and std::vector can be
used directly with this interface. The interface no longer forces you to
solely use containers that dynamically allocate.
To ensure our overloads play nice with one another, we only enable the
container-based WriteBuffer if the argument is not a pointer, otherwise
we fall back to the pointer-based one.
8 years ago
Lioncash
af2698dcea
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.
Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
8 years ago
Lioncash
46458e7284
core/memory, core/hle/kernel: Use std::move where applicable
Avoids pointless copies
8 years ago
bunnei
170e19d4ea
nvflinger: Fix for BufferQueue event handling.
8 years ago
David Marcec
a7d6c0d6ea
No need to use ASSERT_MSG with an empty message
8 years ago
James Rowe
0d46f0df12
Update clang format
8 years ago
James Rowe
638956aa81
Rename logging macro back to LOG_*
8 years ago
mailwl
a27befe456
IPC: skip empty buffer write
prevent yuzu crash, if games, like Axiom Verge, trying to read 0 bytes from file
8 years ago
David Marcec
fd86cdb2e2
Added RequestWithContext & ControlWithContext
8 years ago
David
ff2f0d980a
GetSharedFontInOrderOfPriority ( #381 )
* GetSharedFontInOrderOfPriority
* Update pl_u.cpp
* Ability to use ReadBuffer and WriteBuffer with different buffer indexes, fixed up GetSharedFontInOrderOfPriority
* switched to NGLOG
* Update pl_u.cpp
* Update pl_u.cpp
* language_code is actually language code and not index
* u32->u64
* final cleanups
8 years ago
Lioncash
40dee76c57
kernel: Migrate logging macros to fmt-compatible ones
8 years ago
bunnei
f4ba523992
hle_ipc, fsp_srv: Cleanup logging.
8 years ago
bunnei
eef097bdc7
hle_ipc: Do not ensure write buffer size.
8 years ago
N00byKing
ef875d6a35
Clean Warnings (?)
8 years ago
bunnei
c86af6939c
hle_ipc: Add SleepClientThread to block current thread within HLE routines.
8 years ago
bunnei
2faa83ca13
hle_ipc: Use shared_ptr instead of unique_ptr to allow copies.
8 years ago
bunnei
019f1a0cf0
hle_ipc: Remove GetPointer(..) usage with WriteToOutgoingCommandBuffer.
8 years ago
mailwl
1289a3c3c1
Add warning if Domain request has no domain message header
8 years ago
mailwl
827152d1fd
Fix: change check for domain order and existance of domain message header
8 years ago
mailwl
1572c45aa0
IPC: add domain header to response if only it exists in request
8 years ago
mailwl
6797d4a907
Service/hid: stub some functions
8 years ago
bunnei
88bfec37ce
hle_ipc: Remove const from WriteBuffer size.
8 years ago
bunnei
6fd19f05f1
hle_ipc: Add GetReadBufferSize and check write buffer size.
8 years ago
bunnei
fc1b425520
hle_ipc: Add helper functions for reading and writing buffers.
8 years ago
bunnei
1ce6fff064
hle_ipc: Add helper functions for reading and writing buffers.
8 years ago
bunnei
27bad0598a
hle: Integrate Domain handling into ServerSession.
8 years ago
bunnei
67758857e4
hle: Remove Domain and SyncObject kernel objects.
8 years ago
James Rowe
096be16636
Format: Run the new clang format on everything
8 years ago
River City Ransomware
dd62f125c3
Fixes some cast warnings, partial port of citra #3064 ( #106 )
* Fixes some cast warnings, partially fixes citra #3064
* Converted casts to uint32_t to u32
* Ran clang-format
8 years ago
gdkchan
59575d5cae
Stub PopLaunchParameter and implement Buffer C Descriptors reading on hle_ipc ( #96 )
* Stub PopLaunchParameter and implement Buffer C Descriptors reading
* Address PR feedback
* Ensure we push a u64 not a size_t
* Fix formatting
8 years ago
bunnei
b588cbcb1d
hle_ipc: Clang format.
8 years ago
bunnei
30cb98f874
ipc: Implement domain command CloseVirtualHandle.
8 years ago
bunnei
1247c53786
yuzu: Update license text to be consistent across project.
8 years ago
Subv
ab86b80cac
IPC: Corrected some definitions for the buffer C descriptor flags.
8 years ago
Subv
32847d8b86
IPC: Add functions to read the input move/copy objects from an IPC request.
8 years ago
Subv
7e3561b1cd
IPC: Don't attempt to read the command buffer if it holds a Close request.
8 years ago
Subv
0368324f79
IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.
Popping objects from the buffer is still not implemented.
8 years ago
Subv
b0ceb4df70
IPC: Skip the entire u64 of the command id when receiving an IPC request.
Service code now doesn't have to deal with this.
8 years ago
Subv
226786f0b0
IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.
Domain object ids are always stored immediately after the raw data.
8 years ago
bunnei
dcdaac8a0b
kernel: Fix implementation of ConvertSessionToDomain.
8 years ago
bunnei
654fae29c1
hle_ipc: Only copy necessary fields for outgoing command buffer.
8 years ago
bunnei
b283cf7348
hle_ipc: Parse out buffer X/A/B/B descriptors from incoming command buffer.
8 years ago
bunnei
4fb1b24d68
hle: Implement ConvertSessionToDomain, various cleanups.
8 years ago
bunnei
960a1416de
hle: Initial implementation of NX service framework and IPC.
8 years ago
Huw Pascoe
a13ab958cb
Fixed type conversion ambiguity
8 years ago
Yuri Kunde Schlesner
f64d0b3f26
Kernel/IPC: Support translation of null handles
Missed this in my first implementation. Thanks to @wwylele for pointing
out that this was missing.
9 years ago
Yuri Kunde Schlesner
0dfafdbe59
Kernel/IPC: Make HLERequestContext usable from outside kernel
9 years ago
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).
9 years ago
Yuri Kunde Schlesner
8cb65fe65a
Kernel: Basic support for IPC translation for HLE services
9 years ago
Yuri Kunde Schlesner
05fee70211
Kernel: Add methods in HLERequestContext abstracting handle creation
9 years ago