diff options
author | Andrew Schultz <alschult@umich.edu> | 2004-02-09 17:50:47 -0500 |
---|---|---|
committer | Andrew Schultz <alschult@umich.edu> | 2004-02-09 17:50:47 -0500 |
commit | eac2d6a66863dcd7d5129ee5112ea49248f9efa8 (patch) | |
tree | d59508dd612d82b80fef69ded188e2704e074d40 /sim | |
parent | 48bb27be728db65ad521eb5bda8cb3411dfddc43 (diff) | |
parent | da8a7022126eef87d4007b7135aa89c559eb6747 (diff) | |
download | gem5-eac2d6a66863dcd7d5129ee5112ea49248f9efa8.tar.xz |
Merge linux tree with head
arch/alpha/alpha_memory.cc:
dev/alpha_console.cc:
dev/alpha_console.hh:
Merge
--HG--
extra : convert_revision : 3233648f204338ab3f102ff117754dce955dcc37
Diffstat (limited to 'sim')
-rw-r--r-- | sim/eventq.hh | 4 | ||||
-rw-r--r-- | sim/serialize.cc | 4 | ||||
-rw-r--r-- | sim/serialize.hh | 2 | ||||
-rw-r--r-- | sim/sim_object.hh | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sim/eventq.hh b/sim/eventq.hh index 36cb402a8..31bf9d652 100644 --- a/sim/eventq.hh +++ b/sim/eventq.hh @@ -153,7 +153,7 @@ class Event : public Serializable, public FastAlloc ~Event() {} - virtual std::string name() const { + virtual const std::string name() const { return csprintf("Event_%x", (uintptr_t)this); } @@ -257,7 +257,7 @@ class EventQueue : public Serializable : objName(n), head(NULL) {} - virtual std::string name() const { return objName; } + virtual const std::string name() const { return objName; } // schedule the given event on this queue void schedule(Event *ev); diff --git a/sim/serialize.cc b/sim/serialize.cc index ba5a99afd..f8d6b46bf 100644 --- a/sim/serialize.cc +++ b/sim/serialize.cc @@ -186,7 +186,7 @@ INSTANTIATE_PARAM_TEMPLATES(string) class Globals : public Serializable { public: - string name() const; + const string name() const; void serialize(ostream &os); void unserialize(Checkpoint *cp); }; @@ -194,7 +194,7 @@ class Globals : public Serializable /// The one and only instance of the Globals class. Globals globals; -string +const string Globals::name() const { return "Globals"; diff --git a/sim/serialize.hh b/sim/serialize.hh index e561604bf..36622b7fe 100644 --- a/sim/serialize.hh +++ b/sim/serialize.hh @@ -111,7 +111,7 @@ class Serializable virtual ~Serializable() {} // manditory virtual function, so objects must provide names - virtual std::string name() const = 0; + virtual const std::string name() const = 0; virtual void serialize(std::ostream &os) {} virtual void unserialize(Checkpoint *cp, const std::string §ion) {} diff --git a/sim/sim_object.hh b/sim/sim_object.hh index 165931b2b..aaaafc04b 100644 --- a/sim/sim_object.hh +++ b/sim/sim_object.hh @@ -63,7 +63,7 @@ class SimObject : public Serializable virtual ~SimObject() {} - virtual std::string name() const { return objName; } + virtual const std::string name() const { return objName; } // initialization pass of all objects. Gets invoked by SimInit() virtual void init(); |