More base-derived fixes
This commit is contained in:
@@ -70,6 +70,7 @@ private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<BackingMem>(*this);
|
||||
ar& boost::serialization::make_binary_object(&config_mem, sizeof(config_mem));
|
||||
}
|
||||
};
|
||||
|
@@ -50,6 +50,7 @@ private:
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::WakeupCallback>(*this);
|
||||
ar& callback;
|
||||
ar& context;
|
||||
}
|
||||
|
@@ -222,6 +222,11 @@ public:
|
||||
virtual ~WakeupCallback() = default;
|
||||
virtual void WakeUp(std::shared_ptr<Thread> thread, HLERequestContext& context,
|
||||
ThreadWakeupReason reason) = 0;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -111,7 +111,7 @@ 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& boost::serialization::base_object<WaitObject>(*this);
|
||||
ar& name;
|
||||
ar& parent;
|
||||
ar& hle_handler;
|
||||
|
@@ -109,6 +109,7 @@ private:
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& linear_heap_phys_offset;
|
||||
ar& backing_blocks;
|
||||
ar& size;
|
||||
|
@@ -117,6 +117,7 @@ private:
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<BackingMem>(*this);
|
||||
ar& boost::serialization::make_binary_object(&shared_page, sizeof(shared_page));
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
|
@@ -434,6 +434,7 @@ private:
|
||||
SVC_SyncCallback() = default;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::WakeupCallback>(*this);
|
||||
ar& do_output;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
@@ -466,7 +467,9 @@ private:
|
||||
SVC_IPCCallback() : system(Core::Global<Core::System>()) {}
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::WakeupCallback>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
|
@@ -32,6 +32,7 @@ namespace Kernel {
|
||||
|
||||
template <class Archive>
|
||||
void Thread::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar&* context.get();
|
||||
ar& thread_id;
|
||||
ar& status;
|
||||
|
@@ -66,6 +66,11 @@ public:
|
||||
virtual ~WakeupCallback() = default;
|
||||
virtual void WakeUp(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
|
||||
std::shared_ptr<WaitObject> object) = 0;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
class ThreadManager {
|
||||
|
@@ -1189,6 +1189,7 @@ private:
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::HLERequestContext::WakeupCallback>(*this);
|
||||
ar& command_id;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
|
@@ -3,6 +3,9 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <tuple>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/unordered_map.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
@@ -21,8 +24,19 @@
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
#include "core/hle/service/sm/srv.h"
|
||||
|
||||
SERVICE_CONSTRUCT_IMPL(Service::SM::SRV)
|
||||
SERIALIZE_EXPORT_IMPL(Service::SM::SRV)
|
||||
|
||||
namespace Service::SM {
|
||||
|
||||
template <class Archive>
|
||||
void SRV::serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
ar& notification_semaphore;
|
||||
ar& get_service_handle_delayed_map;
|
||||
}
|
||||
SERIALIZE_IMPL(SRV)
|
||||
|
||||
constexpr int MAX_PENDING_NOTIFICATIONS = 16;
|
||||
|
||||
/**
|
||||
@@ -107,6 +121,7 @@ private:
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::HLERequestContext::WakeupCallback>(*this);
|
||||
ar& name;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
|
@@ -40,8 +40,14 @@ private:
|
||||
Core::System& system;
|
||||
std::shared_ptr<Kernel::Semaphore> notification_semaphore;
|
||||
std::unordered_map<std::string, std::shared_ptr<Kernel::Event>> get_service_handle_delayed_map;
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int);
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
} // namespace Service::SM
|
||||
|
||||
SERVICE_CONSTRUCT(Service::SM::SRV)
|
||||
BOOST_CLASS_EXPORT_KEY(Service::SM::SRV)
|
||||
BOOST_CLASS_EXPORT_KEY(Service::SM::SRV::ThreadCallback)
|
||||
|
Reference in New Issue
Block a user