summaryrefslogtreecommitdiff
path: root/src/sim/serialize.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-09-03 15:40:20 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-09-03 15:40:20 -0500
commit80b911afd573ecda0cefb8f24b83d94b7faf4b7b (patch)
tree95aa2f9794fe70fa812c63583f9db6602457b69e /src/sim/serialize.hh
parent2ab38ba13c6245480a08cd5b8651b5af8fce5a4b (diff)
parent87b9da2df4d4dc0028566a7803ee55159343d735 (diff)
downloadgem5-80b911afd573ecda0cefb8f24b83d94b7faf4b7b.tar.xz
merged with recent commits.
Diffstat (limited to 'src/sim/serialize.hh')
-rw-r--r--src/sim/serialize.hh26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 561cd5508..9a1170a9e 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -55,6 +55,7 @@
#include <list>
#include <map>
#include <stack>
+#include <set>
#include <vector>
#include "base/bitunion.hh"
@@ -70,15 +71,6 @@ class EventQueue;
typedef std::ostream CheckpointOut;
-/** The current version of the checkpoint format.
- * This should be incremented by 1 and only 1 for every new version, where a new
- * version is defined as a checkpoint created before this version won't work on
- * the current version until the checkpoint format is updated. Adding a new
- * SimObject shouldn't cause the version number to increase, only changes to
- * existing objects such as serializing/unserializing more state, changing sizes
- * of serialized arrays, etc. */
-static const uint64_t gem5CheckpointVersion = 0x000000000000000f;
-
template <class T>
void paramOut(CheckpointOut &cp, const std::string &name, const T &param);
@@ -100,13 +92,15 @@ void paramIn(CheckpointIn &cp, const std::string &name,
}
template <class T>
-bool optParamIn(CheckpointIn &cp, const std::string &name, T &param);
+bool optParamIn(CheckpointIn &cp, const std::string &name, T &param,
+ bool warn = true);
template <typename DataType, typename BitUnion>
bool optParamIn(CheckpointIn &cp, const std::string &name,
- BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p)
+ BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p,
+ bool warn = true)
{
- return optParamIn(cp, name, p.__data);
+ return optParamIn(cp, name, p.__data, warn);
}
template <class T>
@@ -122,6 +116,10 @@ void arrayParamOut(CheckpointOut &cp, const std::string &name,
const std::list<T> &param);
template <class T>
+void arrayParamOut(CheckpointOut &cp, const std::string &name,
+ const std::set<T> &param);
+
+template <class T>
void arrayParamIn(CheckpointIn &cp, const std::string &name,
T *param, unsigned size);
@@ -133,6 +131,10 @@ template <class T>
void arrayParamIn(CheckpointIn &cp, const std::string &name,
std::list<T> &param);
+template <class T>
+void arrayParamIn(CheckpointIn &cp, const std::string &name,
+ std::set<T> &param);
+
void
objParamIn(CheckpointIn &cp, const std::string &name, SimObject * &param);