2017-10-02 02:56:43 +00:00
|
|
|
// Copyright 2017 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-11-08 19:05:54 +00:00
|
|
|
#include <memory>
|
2018-11-08 18:53:20 +00:00
|
|
|
#include <vector>
|
2017-10-02 02:56:43 +00:00
|
|
|
#include "common/common_types.h"
|
2018-11-08 18:53:20 +00:00
|
|
|
#include "core/hle/ipc.h"
|
2017-10-02 02:56:43 +00:00
|
|
|
#include "core/hle/kernel/thread.h"
|
|
|
|
|
|
|
|
namespace Kernel {
|
2018-11-08 18:53:20 +00:00
|
|
|
|
|
|
|
struct MappedBufferContext {
|
|
|
|
IPC::MappedBufferPermissions permissions;
|
|
|
|
u32 size;
|
|
|
|
VAddr source_address;
|
|
|
|
VAddr target_address;
|
2018-11-08 19:05:54 +00:00
|
|
|
|
|
|
|
std::unique_ptr<u8[]> buffer;
|
|
|
|
std::unique_ptr<u8[]> reserve_buffer;
|
2018-11-08 18:53:20 +00:00
|
|
|
};
|
|
|
|
|
2017-10-02 02:56:43 +00:00
|
|
|
/// Performs IPC command buffer translation from one process to another.
|
|
|
|
ResultCode TranslateCommandBuffer(SharedPtr<Thread> src_thread, SharedPtr<Thread> dst_thread,
|
2018-11-08 18:53:20 +00:00
|
|
|
VAddr src_address, VAddr dst_address,
|
|
|
|
std::vector<MappedBufferContext>& mapped_buffer_context,
|
|
|
|
bool reply);
|
2017-10-02 02:56:43 +00:00
|
|
|
} // namespace Kernel
|