From 18de63cea01785c2d4d569b5b78ef6c44751d60a Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Wed, 9 Jun 2021 22:05:05 -0300 Subject: [PATCH] sim: Remove (UN)SERIALIZE_OBJ_PTR SimObjects keep a static list with all existing SimObjects. This list is then used to serialize all objects declared in the system. If these macros were used then an object would be serialized more than once, which is not a correct behavior. Change-Id: Idc4433ec2a23a21ee5ee2b7cc2facfe3dd979859 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46720 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/sim/serialize.hh | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index ebf260af40..d20d9cf943 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -654,25 +654,6 @@ mappingParamIn(CheckpointIn &cp, const char* sectionName, */ #define UNSERIALIZE_OBJ(obj) obj.unserializeSection(cp, #obj) -/** - * \def SERIALIZE_OBJPTR(objptr) - * - * @ingroup api_serialize - */ -#define SERIALIZE_OBJPTR(objptr) paramOut(cp, #objptr, (objptr)->name()) - -/** - * \def UNSERIALIZE_OBJPTR(objptr) - * - * @ingroup api_serialize - */ -#define UNSERIALIZE_OBJPTR(objptr) \ - do { \ - SimObject *sptr; \ - objParamIn(cp, #objptr, sptr); \ - objptr = dynamic_cast(sptr); \ - } while (0) - /** * \def SERIALIZE_MAPPING(member, names, size) */