More base-derived fixes

This commit is contained in:
Hamish Milne 2020-01-08 23:19:49 +00:00 committed by zhupengfei
parent 996aba39fe
commit 9525d81344
23 changed files with 75 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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)