clang-format fixes
This commit is contained in:
parent
d482fb359c
commit
7b846ffa98
117 changed files with 797 additions and 925 deletions
|
@ -6,12 +6,12 @@
|
|||
#include "common/archives.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/address_arbiter.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/global.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Kernel namespace
|
||||
|
|
|
@ -74,11 +74,10 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & name;
|
||||
ar & waiting_threads;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& name;
|
||||
ar& waiting_threads;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
|
@ -11,7 +12,6 @@
|
|||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/server_port.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::ClientPort)
|
||||
|
||||
|
|
|
@ -61,17 +61,15 @@ private:
|
|||
|
||||
friend class KernelSystem;
|
||||
|
||||
|
||||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & server_port;
|
||||
ar & max_sessions;
|
||||
ar & active_sessions;
|
||||
ar & name;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& server_port;
|
||||
ar& max_sessions;
|
||||
ar& active_sessions;
|
||||
ar& name;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
|
|
|
@ -53,11 +53,10 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & name;
|
||||
ar & parent;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& name;
|
||||
ar& parent;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -60,10 +60,9 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
auto o_config_mem = boost::serialization::binary_object(&config_mem, sizeof(config_mem));
|
||||
ar & o_config_mem;
|
||||
ar& o_config_mem;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "common/assert.h"
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
|
|
|
@ -53,12 +53,11 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<WaitObject>(*this);
|
||||
ar & reset_type;
|
||||
ar & signaled;
|
||||
ar & name;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& reset_type;
|
||||
ar& signaled;
|
||||
ar& name;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -121,12 +121,11 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & objects;
|
||||
ar & generations;
|
||||
ar & next_generation;
|
||||
ar & next_free_slot;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& objects;
|
||||
ar& generations;
|
||||
ar& next_generation;
|
||||
ar& next_free_slot;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/container/small_vector.hpp>
|
||||
#include <boost/serialization/unique_ptr.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/assume_abstract.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/unique_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/hle/ipc.h"
|
||||
|
@ -74,9 +74,10 @@ public:
|
|||
/// in each service must inherit from this.
|
||||
struct SessionDataBase {
|
||||
virtual ~SessionDataBase() = default;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) { }
|
||||
void serialize(Archive& ar, const unsigned int file_version) {}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
|
@ -104,10 +105,9 @@ protected:
|
|||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & session;
|
||||
ar & data;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& session;
|
||||
ar& data;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
@ -117,9 +117,8 @@ protected:
|
|||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & connected_sessions;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& connected_sessions;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
|
|
@ -30,15 +30,15 @@ struct MappedBufferContext {
|
|||
|
||||
private:
|
||||
template <class Archive>
|
||||
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;
|
||||
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;
|
||||
};
|
||||
|
|
|
@ -104,20 +104,19 @@ void KernelSystem::AddNamedPort(std::string name, std::shared_ptr<ClientPort> po
|
|||
}
|
||||
|
||||
template <class Archive>
|
||||
void KernelSystem::serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & memory_regions;
|
||||
ar & named_ports;
|
||||
ar & *current_cpu.get();
|
||||
void KernelSystem::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& memory_regions;
|
||||
ar& named_ports;
|
||||
ar&* current_cpu.get();
|
||||
// NB: subsystem references and prepare_reschedule_callback are constant
|
||||
ar & *resource_limits.get();
|
||||
ar & next_object_id;
|
||||
ar & *timer_manager.get();
|
||||
ar & next_process_id;
|
||||
ar & process_list;
|
||||
ar & current_process;
|
||||
ar & *thread_manager.get();
|
||||
ar & *config_mem_handler.get();
|
||||
ar&* resource_limits.get();
|
||||
ar& next_object_id;
|
||||
ar&* timer_manager.get();
|
||||
ar& next_process_id;
|
||||
ar& process_list;
|
||||
ar& current_process;
|
||||
ar&* thread_manager.get();
|
||||
ar&* config_mem_handler.get();
|
||||
// Shared page data is read-only at the moment, so doesn't need serializing
|
||||
// Deliberately don't include debugger info to allow debugging through loads
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <optional>
|
||||
#include <boost/icl/interval_set.hpp>
|
||||
#include <boost/serialization/set.hpp>
|
||||
#include "common/serialization/boost_discrete_interval.hpp"
|
||||
#include "common/common_types.h"
|
||||
#include "common/serialization/boost_discrete_interval.hpp"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -66,13 +66,12 @@ struct MemoryRegionInfo {
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & base;
|
||||
ar & size;
|
||||
ar & used;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& base;
|
||||
ar& size;
|
||||
ar& used;
|
||||
// This works because interval_set has exactly one member of type ImplSetT
|
||||
ar & *(reinterpret_cast<IntervalSet::ImplSetT*>(&free_blocks));
|
||||
ar&*(reinterpret_cast<IntervalSet::ImplSetT*>(&free_blocks));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/core.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/mutex.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::Mutex)
|
||||
|
||||
|
|
|
@ -62,13 +62,12 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<WaitObject>(*this);
|
||||
ar & lock_count;
|
||||
ar & priority;
|
||||
ar & name;
|
||||
ar & holding_thread;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& lock_count;
|
||||
ar& priority;
|
||||
ar& name;
|
||||
ar& holding_thread;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/assume_abstract.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/serialization/atomic.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "common/serialization/atomic.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -72,9 +72,8 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & object_id;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& object_id;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -102,11 +101,10 @@ inline std::shared_ptr<T> DynamicObjectCast(std::shared_ptr<Object> object) {
|
|||
|
||||
BOOST_SERIALIZATION_ASSUME_ABSTRACT(Kernel::Object)
|
||||
|
||||
#define CONSTRUCT_KERNEL_OBJECT(T) \
|
||||
namespace boost::serialization { \
|
||||
template<class Archive> \
|
||||
inline void load_construct_data( \
|
||||
Archive & ar, T * t, const unsigned int file_version \
|
||||
){ \
|
||||
::new(t)T(Core::Global<Kernel::KernelSystem>()); \
|
||||
}}
|
||||
#define CONSTRUCT_KERNEL_OBJECT(T) \
|
||||
namespace boost::serialization { \
|
||||
template <class Archive> \
|
||||
inline void load_construct_data(Archive& ar, T* t, const unsigned int file_version) { \
|
||||
::new (t) T(Core::Global<Kernel::KernelSystem>()); \
|
||||
} \
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "common/common_funcs.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/serialization/boost_vector.hpp"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/memory.h"
|
||||
#include "core/hle/kernel/process.h"
|
||||
|
@ -18,7 +19,6 @@
|
|||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/kernel/vm_manager.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::Process)
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::CodeSet)
|
||||
|
@ -26,24 +26,25 @@ SERIALIZE_EXPORT_IMPL(Kernel::CodeSet)
|
|||
namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void Process::serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & handle_table;
|
||||
ar & codeset;
|
||||
ar & resource_limit;
|
||||
ar & svc_access_mask;
|
||||
ar & handle_table_size;
|
||||
ar & (boost::container::vector<AddressMapping, boost::container::dtl::static_storage_allocator<AddressMapping, 8> >&)address_mappings;
|
||||
ar & flags.raw;
|
||||
ar & kernel_version;
|
||||
ar & ideal_processor;
|
||||
ar & status;
|
||||
ar & process_id;
|
||||
ar & vm_manager;
|
||||
ar & memory_used;
|
||||
ar & memory_region;
|
||||
ar & tls_slots;
|
||||
void Process::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& handle_table;
|
||||
ar& codeset;
|
||||
ar& resource_limit;
|
||||
ar& svc_access_mask;
|
||||
ar& handle_table_size;
|
||||
ar&(boost::container::vector<
|
||||
AddressMapping, boost::container::dtl::static_storage_allocator<AddressMapping, 8>>&)
|
||||
address_mappings;
|
||||
ar& flags.raw;
|
||||
ar& kernel_version;
|
||||
ar& ideal_processor;
|
||||
ar& status;
|
||||
ar& process_id;
|
||||
ar& vm_manager;
|
||||
ar& memory_used;
|
||||
ar& memory_region;
|
||||
ar& tls_slots;
|
||||
}
|
||||
|
||||
SERIALIZE_IMPL(Process)
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/container/static_vector.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
|
@ -31,12 +31,11 @@ struct AddressMapping {
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & address;
|
||||
ar & size;
|
||||
ar & read_only;
|
||||
ar & unk_flag;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& address;
|
||||
ar& size;
|
||||
ar& read_only;
|
||||
ar& unk_flag;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -76,11 +75,10 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & offset;
|
||||
ar & addr;
|
||||
ar & size;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& offset;
|
||||
ar& addr;
|
||||
ar& size;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -133,14 +131,13 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
// TODO: memory reference
|
||||
ar & segments;
|
||||
ar & entrypoint;
|
||||
ar & name;
|
||||
ar & program_id;
|
||||
ar& segments;
|
||||
ar& entrypoint;
|
||||
ar& name;
|
||||
ar& program_id;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -116,30 +116,30 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
// NB most of these aren't used at all currently, but we're adding them here for forwards compatibility
|
||||
ar & name;
|
||||
ar & max_priority;
|
||||
ar & max_commit;
|
||||
ar & max_threads;
|
||||
ar & max_events;
|
||||
ar & max_mutexes;
|
||||
ar & max_semaphores;
|
||||
ar & max_timers;
|
||||
ar & max_shared_mems;
|
||||
ar & max_address_arbiters;
|
||||
ar & max_cpu_time;
|
||||
ar & current_commit;
|
||||
ar & current_threads;
|
||||
ar & current_events;
|
||||
ar & current_mutexes;
|
||||
ar & current_semaphores;
|
||||
ar & current_timers;
|
||||
ar & current_shared_mems;
|
||||
ar & current_address_arbiters;
|
||||
ar & current_cpu_time;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
// NB most of these aren't used at all currently, but we're adding them here for forwards
|
||||
// compatibility
|
||||
ar& name;
|
||||
ar& max_priority;
|
||||
ar& max_commit;
|
||||
ar& max_threads;
|
||||
ar& max_events;
|
||||
ar& max_mutexes;
|
||||
ar& max_semaphores;
|
||||
ar& max_timers;
|
||||
ar& max_shared_mems;
|
||||
ar& max_address_arbiters;
|
||||
ar& max_cpu_time;
|
||||
ar& current_commit;
|
||||
ar& current_threads;
|
||||
ar& current_events;
|
||||
ar& current_mutexes;
|
||||
ar& current_semaphores;
|
||||
ar& current_timers;
|
||||
ar& current_shared_mems;
|
||||
ar& current_address_arbiters;
|
||||
ar& current_cpu_time;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -160,9 +160,8 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & resource_limits;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& resource_limits;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/semaphore.h"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <queue>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/wait_object.h"
|
||||
|
@ -48,12 +48,11 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<WaitObject>(*this);
|
||||
ar & max_count;
|
||||
ar & available_count;
|
||||
ar & name;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& max_count;
|
||||
ar& available_count;
|
||||
ar& name;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/server_port.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::ServerPort)
|
||||
|
||||
|
@ -53,12 +53,11 @@ KernelSystem::PortPair KernelSystem::CreatePortPair(u32 max_sessions, std::strin
|
|||
}
|
||||
|
||||
template <class Archive>
|
||||
void ServerPort::serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<WaitObject>(*this);
|
||||
ar & name;
|
||||
ar & pending_sessions;
|
||||
ar & hle_handler;
|
||||
void ServerPort::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& name;
|
||||
ar& pending_sessions;
|
||||
ar& hle_handler;
|
||||
}
|
||||
SERIALIZE_IMPL(ServerPort)
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
#include <tuple>
|
||||
#include "common/archives.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
#include "core/hle/kernel/session.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::ServerSession)
|
||||
|
||||
|
|
|
@ -110,15 +110,14 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & name;
|
||||
ar & parent;
|
||||
ar & hle_handler;
|
||||
ar & pending_requesting_threads;
|
||||
ar & currently_handling;
|
||||
ar & mapped_buffer_context;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& name;
|
||||
ar& parent;
|
||||
ar& hle_handler;
|
||||
ar& pending_requesting_threads;
|
||||
ar& currently_handling;
|
||||
ar& mapped_buffer_context;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,22 +4,21 @@
|
|||
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "core/hle/kernel/session.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
#include "core/hle/kernel/session.h"
|
||||
|
||||
SERIALIZE_IMPL(Kernel::Session)
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void Session::serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & client;
|
||||
ar & server;
|
||||
ar & port;
|
||||
void Session::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& client;
|
||||
ar& server;
|
||||
ar& port;
|
||||
}
|
||||
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include <cstring>
|
||||
#include "common/archives.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/memory.h"
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::SharedMemory)
|
||||
|
||||
|
|
|
@ -107,17 +107,16 @@ private:
|
|||
KernelSystem& kernel;
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & linear_heap_phys_offset;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& linear_heap_phys_offset;
|
||||
// TODO: backing blocks u8* (this is always FCRAM I think)
|
||||
ar & size;
|
||||
ar & permissions;
|
||||
ar & other_permissions;
|
||||
ar & owner_process;
|
||||
ar & base_address;
|
||||
ar & name;
|
||||
ar & *(reinterpret_cast<MemoryRegionInfo::IntervalSet::ImplSetT*>(&holding_memory));
|
||||
ar& size;
|
||||
ar& permissions;
|
||||
ar& other_permissions;
|
||||
ar& owner_process;
|
||||
ar& base_address;
|
||||
ar& name;
|
||||
ar&*(reinterpret_cast<MemoryRegionInfo::IntervalSet::ImplSetT*>(&holding_memory));
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
|
|
@ -108,10 +108,9 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
auto o_shared_page = boost::serialization::binary_object(&shared_page, sizeof(shared_page));
|
||||
ar & o_shared_page;
|
||||
ar& o_shared_page;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "core/arm/arm_interface.h"
|
||||
#include "core/arm/skyeye_common/armstate.h"
|
||||
#include "core/core.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
|
@ -24,31 +25,29 @@
|
|||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::Thread)
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void Thread::serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & *context.get();
|
||||
ar & thread_id;
|
||||
ar & status;
|
||||
ar & entry_point;
|
||||
ar & stack_top;
|
||||
ar & nominal_priority;
|
||||
ar & current_priority;
|
||||
ar & last_running_ticks;
|
||||
ar & processor_id;
|
||||
ar & tls_address;
|
||||
ar & held_mutexes;
|
||||
ar & pending_mutexes;
|
||||
ar & owner_process;
|
||||
ar & wait_objects;
|
||||
ar & wait_address;
|
||||
ar & name;
|
||||
void Thread::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar&* context.get();
|
||||
ar& thread_id;
|
||||
ar& status;
|
||||
ar& entry_point;
|
||||
ar& stack_top;
|
||||
ar& nominal_priority;
|
||||
ar& current_priority;
|
||||
ar& last_running_ticks;
|
||||
ar& processor_id;
|
||||
ar& tls_address;
|
||||
ar& held_mutexes;
|
||||
ar& pending_mutexes;
|
||||
ar& owner_process;
|
||||
ar& wait_objects;
|
||||
ar& wait_address;
|
||||
ar& name;
|
||||
// TODO: How the hell to do wakeup_callback
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/unordered_map.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/thread_queue_list.h"
|
||||
#include "core/arm/arm_interface.h"
|
||||
|
@ -152,13 +152,12 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & next_thread_id;
|
||||
ar & current_thread;
|
||||
ar & ready_queue;
|
||||
ar & wakeup_callback_table;
|
||||
ar & thread_list;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& next_thread_id;
|
||||
ar& current_thread;
|
||||
ar& ready_queue;
|
||||
ar& wakeup_callback_table;
|
||||
ar& thread_list;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core.h"
|
||||
#include "core/global.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/kernel/timer.h"
|
||||
#include "core/global.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::Timer)
|
||||
|
||||
|
|
|
@ -37,10 +37,9 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & next_timer_callback_id;
|
||||
ar & timer_callback_table;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& next_timer_callback_id;
|
||||
ar& timer_callback_table;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -115,14 +114,13 @@ private:
|
|||
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & reset_type;
|
||||
ar & initial_delay;
|
||||
ar & interval_delay;
|
||||
ar & signaled;
|
||||
ar & name;
|
||||
ar & callback_id;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& reset_type;
|
||||
ar& initial_delay;
|
||||
ar& interval_delay;
|
||||
ar& signaled;
|
||||
ar& name;
|
||||
ar& callback_id;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -86,17 +86,16 @@ struct VirtualMemoryArea {
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & base;
|
||||
ar & size;
|
||||
ar & type;
|
||||
ar & permissions;
|
||||
ar & meminfo_state;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& base;
|
||||
ar& size;
|
||||
ar& type;
|
||||
ar& permissions;
|
||||
ar& meminfo_state;
|
||||
// TODO: backing memory ref
|
||||
// backing memory can be: Physical/FCRAM pointer, config mem, shared page
|
||||
ar & paddr;
|
||||
ar & mmio_handler;
|
||||
ar& paddr;
|
||||
ar& mmio_handler;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -213,27 +212,25 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void save(Archive& ar, const unsigned int file_version) const
|
||||
{
|
||||
ar & vma_map;
|
||||
void save(Archive& ar, const unsigned int file_version) const {
|
||||
ar& vma_map;
|
||||
for (int i = 0; i < page_table.pointers.size(); i++) {
|
||||
ar << memory.GetFCRAMOffset(page_table.pointers[i]);
|
||||
}
|
||||
ar & page_table.special_regions;
|
||||
ar & page_table.attributes;
|
||||
ar& page_table.special_regions;
|
||||
ar& page_table.attributes;
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
void load(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & vma_map;
|
||||
void load(Archive& ar, const unsigned int file_version) {
|
||||
ar& vma_map;
|
||||
for (int i = 0; i < page_table.pointers.size(); i++) {
|
||||
u32 offset{};
|
||||
ar >> offset;
|
||||
page_table.pointers[i] = memory.GetFCRAMPointer(offset);
|
||||
}
|
||||
ar & page_table.special_regions;
|
||||
ar & page_table.attributes;
|
||||
ar& page_table.special_regions;
|
||||
ar& page_table.attributes;
|
||||
}
|
||||
|
||||
BOOST_SERIALIZATION_SPLIT_MEMBER()
|
||||
|
|
|
@ -69,10 +69,9 @@ private:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version)
|
||||
{
|
||||
ar & boost::serialization::base_object<Object>(*this);
|
||||
ar & waiting_threads;
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& waiting_threads;
|
||||
// NB: hle_notifier *not* serialized since it's a callback!
|
||||
// Fortunately it's only used in one place (DSP) so we can reconstruct it there
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue