kernel: Move serialization code out of headers. (#7312)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user