projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3ecfa6
)
sim: Add macros to serialize objects into a section
author
Andreas Sandberg
<andreas.sandberg@arm.com>
Tue, 7 Jul 2015 08:51:04 +0000
(09:51 +0100)
committer
Andreas Sandberg
<andreas.sandberg@arm.com>
Tue, 7 Jul 2015 08:51:04 +0000
(09:51 +0100)
Add the SERIALIZE_OBJ / UNSERIALIZE_OBJ macros that serialize an
object into a subsection of the current checkpoint section.
src/sim/serialize.hh
patch
|
blob
|
history
diff --git
a/src/sim/serialize.hh
b/src/sim/serialize.hh
index a0d4bafe7490eaf6155b3ef1d1ceb498a059187a..ea2bd2928747442d03f85bdb48d48dfbd3c9a633 100644
(file)
--- a/
src/sim/serialize.hh
+++ b/
src/sim/serialize.hh
@@
-186,6
+186,8
@@
void fromSimObject(T &t, SimObject *s)
eventQueue()->checkpointReschedule(&event); \
} while(0)
+#define SERIALIZE_OBJ(obj) obj.serializeSection(cp, #obj)
+#define UNSERIALIZE_OBJ(obj) obj.unserializeSection(cp, #obj)
#define SERIALIZE_OBJPTR(objptr) paramOut(cp, #objptr, (objptr)->name())