mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-27 23:40:05 +00:00
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
// Copyright 2017 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <boost/serialization/vector.hpp>
|
|
#include "common/common_types.h"
|
|
#include "core/hle/ipc.h"
|
|
#include "core/hle/kernel/thread.h"
|
|
|
|
namespace Memory {
|
|
class MemorySystem;
|
|
}
|
|
|
|
namespace Kernel {
|
|
|
|
class KernelSystem;
|
|
|
|
struct MappedBufferContext {
|
|
IPC::MappedBufferPermissions permissions;
|
|
u32 size;
|
|
VAddr source_address;
|
|
VAddr target_address;
|
|
|
|
std::vector<u8> buffer;
|
|
std::vector<u8> reserve_buffer;
|
|
|
|
private:
|
|
template <class Archive>
|
|
void serialize(Archive& ar, const unsigned int file_version) {
|
|
ar& permissions;
|
|
ar& size;
|
|
ar& source_address;
|
|
ar& target_address;
|
|
ar& buffer;
|
|
ar& reserve_buffer;
|
|
}
|
|
friend class boost::serialization::access;
|
|
};
|
|
|
|
/// Performs IPC command buffer translation from one process to another.
|
|
ResultCode TranslateCommandBuffer(KernelSystem& system, Memory::MemorySystem& memory,
|
|
std::shared_ptr<Thread> src_thread,
|
|
std::shared_ptr<Thread> dst_thread, VAddr src_address,
|
|
VAddr dst_address,
|
|
std::vector<MappedBufferContext>& mapped_buffer_context,
|
|
bool reply);
|
|
} // namespace Kernel
|