Improve kernel IPC related syscalls (#1379)

* Implement session count decrement when the handle is closed

* Remove unused field

* Implement SendSyncRequestWithUserBuffer, SendAsyncRequestWithUserBuffer and ReplyAndReceiveWithUserBuffer syscalls

* Nits

* Fix swapped copy dst/src

* Add missing pointer buffer descriptor write on reply

* Fix IPC unaligned buffer copy and restoring client attributes on reply

* Oops

* Fix SetIpcMappingPermission

* Fix unaligned copy bugs

* Free memory used for temporary IPC buffers
This commit is contained in:
gdkchan 2020-07-17 01:19:07 -03:00 committed by GitHub
parent 46f8cef6a9
commit 9f6b24edfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 705 additions and 247 deletions

View file

@ -127,12 +127,12 @@ namespace Ryujinx.Memory
/// <summary>
/// Copies data from one memory location to another.
/// </summary>
/// <param name="srcOffset">Source offset to read the data from</param>
/// <param name="dstOffset">Destination offset to write the data into</param>
/// <param name="srcOffset">Source offset to read the data from</param>
/// <param name="size">Size of the copy in bytes</param>
/// <exception cref="ObjectDisposedException">Throw when the memory block has already been disposed</exception>
/// <exception cref="ArgumentOutOfRangeException">Throw when <paramref name="srcOffset"/>, <paramref name="dstOffset"/> or <paramref name="size"/> is out of range</exception>
public void Copy(ulong srcOffset, ulong dstOffset, ulong size)
public void Copy(ulong dstOffset, ulong srcOffset, ulong size)
{
const int MaxChunkSize = 1 << 30;