Code review actions (plus hopefully fix the linux CI)
This commit is contained in:
parent
9bd189a155
commit
92640fc29c
46 changed files with 155 additions and 109 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/server_port.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/result.h"
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/wait_object.h"
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/unordered_map.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/serialization/atomic.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/unordered_map.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/memory.h"
|
||||
#include "core/hle/result.h"
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <type_traits>
|
||||
#include <boost/icl/interval_set.hpp>
|
||||
#include <boost/serialization/set.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/serialization/boost_discrete_interval.hpp"
|
||||
#include "common/serialization/boost_interval_set.hpp"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -70,8 +71,7 @@ private:
|
|||
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& free_blocks;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/wait_object.h"
|
||||
|
|
|
@ -104,7 +104,7 @@ 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) { \
|
||||
void load_construct_data(Archive& ar, T* t, const unsigned int file_version) { \
|
||||
::new (t) T(Core::Global<Kernel::KernelSystem>()); \
|
||||
} \
|
||||
}
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
#include <array>
|
||||
#include <memory>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <queue>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <tuple>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/server_session.h"
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <tuple>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#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"
|
||||
|
@ -16,6 +18,18 @@ SERIALIZE_EXPORT_IMPL(Kernel::ServerSession)
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void ServerSession::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& name;
|
||||
ar& parent;
|
||||
ar& hle_handler;
|
||||
ar& pending_requesting_threads;
|
||||
ar& currently_handling;
|
||||
ar& mapped_buffer_context;
|
||||
}
|
||||
SERIALIZE_IMPL(ServerSession)
|
||||
|
||||
ServerSession::ServerSession(KernelSystem& kernel) : WaitObject(kernel), kernel(kernel) {}
|
||||
ServerSession::~ServerSession() {
|
||||
// This destructor will be called automatically when the last ServerSession handle is closed by
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/assert.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/ipc.h"
|
||||
|
@ -110,15 +108,7 @@ 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& 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);
|
||||
};
|
||||
|
||||
} // namespace Kernel
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "common/archives.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"
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#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"
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/memory_ref.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
|
@ -118,7 +120,7 @@ private:
|
|||
ar& owner_process;
|
||||
ar& base_address;
|
||||
ar& name;
|
||||
ar&*(reinterpret_cast<MemoryRegionInfo::IntervalSet::ImplSetT*>(&holding_memory));
|
||||
ar& holding_memory;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <chrono>
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/binary_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/bit_field.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <list>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/common_types.h"
|
||||
|
@ -15,7 +16,6 @@
|
|||
#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"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#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"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/unordered_map.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/core_timing.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/split_member.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/memory_ref.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
|
@ -16,6 +17,15 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void WaitObject::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
|
||||
}
|
||||
SERIALIZE_IMPL(WaitObject)
|
||||
|
||||
void WaitObject::AddWaitingThread(std::shared_ptr<Thread> thread) {
|
||||
auto itr = std::find(waiting_threads.begin(), waiting_threads.end(), thread);
|
||||
if (itr == waiting_threads.end())
|
||||
|
|
|
@ -69,12 +69,7 @@ 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;
|
||||
// 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
|
||||
}
|
||||
void serialize(Archive& ar, const unsigned int file_version);
|
||||
};
|
||||
|
||||
// Specialization of DynamicObjectCast for WaitObjects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue