kernel: Move serialization code out of headers. (#7312)

This commit is contained in:
Steveice10
2024-01-14 16:18:31 -08:00
committed by GitHub
parent 9c84721d84
commit a2d1c4a94c
52 changed files with 458 additions and 270 deletions

View File

@ -6,6 +6,8 @@
#include <memory>
#include <utility>
#include <vector>
#include <boost/serialization/set.hpp>
#include "common/archives.h"
#include "common/assert.h"
#include "common/common_types.h"
#include "common/logging/log.h"
@ -19,6 +21,8 @@
#include "core/hle/result.h"
#include "core/memory.h"
SERIALIZE_EXPORT_IMPL(Kernel::MemoryRegionInfo)
namespace Kernel {
/// Size of the APPLICATION, SYSTEM and BASE memory regions (respectively) for each system
@ -267,4 +271,16 @@ void MemoryRegionInfo::Unlock() {
is_locked = false;
}
template <class Archive>
void MemoryRegionInfo::serialize(Archive& ar, const unsigned int) {
ar& base;
ar& size;
ar& used;
ar& free_blocks;
if (Archive::is_loading::value) {
is_locked = true;
}
}
SERIALIZE_IMPL(MemoryRegionInfo)
} // namespace Kernel