// Copyright 2017 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include #include #include #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::unique_ptr buffer; std::unique_ptr reserve_buffer; private: template void serialize(Archive& ar, const unsigned int file_version) { ar & permissions; ar & size; ar & source_address; ar & target_address; // TODO: Check whether we need these. If we do, add a field for the size and/or change to a 'vector' //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 src_thread, std::shared_ptr dst_thread, VAddr src_address, VAddr dst_address, std::vector& mapped_buffer_context, bool reply); } // namespace Kernel