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

@ -2,6 +2,9 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/string.hpp>
#include "common/archives.h"
#include "common/assert.h"
#include "core/core.h"
@ -127,4 +130,15 @@ void Mutex::UpdatePriority() {
}
}
template <class Archive>
void Mutex::serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<WaitObject>(*this);
ar& lock_count;
ar& priority;
ar& name;
ar& holding_thread;
ar& resource_limit;
}
SERIALIZE_IMPL(Mutex)
} // namespace Kernel