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

@ -3,6 +3,9 @@
// Refer to the license.txt file included.
#include <utility>
#include <boost/serialization/array.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include "common/archives.h"
#include "common/assert.h"
#include "common/logging/log.h"
#include "core/hle/kernel/errors.h"
@ -10,6 +13,8 @@
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/thread.h"
SERIALIZE_EXPORT_IMPL(Kernel::HandleTable)
namespace Kernel {
namespace {
constexpr u16 GetSlot(Handle handle) {
@ -94,4 +99,13 @@ void HandleTable::Clear() {
next_free_slot = 0;
}
template <class Archive>
void HandleTable::serialize(Archive& ar, const unsigned int) {
ar& objects;
ar& generations;
ar& next_generation;
ar& next_free_slot;
}
SERIALIZE_IMPL(HandleTable)
} // namespace Kernel