diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-10-16 15:56:53 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-10-16 15:56:53 -0400 |
commit | 519d11bab32e0ec4cf73f3b1c80f0e77a43155d2 (patch) | |
tree | b9bdd19e2f2aa2698da47d82615d4b5d864eb8cc /src/sim/main.cc | |
parent | f1661baf30faf76dbad7d23aeac0c3dbe4dd045c (diff) | |
parent | 9202422d6ebb7a17936bee1b9aaa427541156d13 (diff) | |
download | gem5-519d11bab32e0ec4cf73f3b1c80f0e77a43155d2.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into zeep.eecs.umich.edu:/home/gblack/m5/newmem
--HG--
extra : convert_revision : 898976bbd322e55bc234035456df8090c6dcf72d
Diffstat (limited to 'src/sim/main.cc')
-rw-r--r-- | src/sim/main.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sim/main.cc b/src/sim/main.cc index 874d0ac85..8bb0d7aaa 100644 --- a/src/sim/main.cc +++ b/src/sim/main.cc @@ -66,6 +66,7 @@ #include "sim/sim_events.hh" #include "sim/sim_exit.hh" #include "sim/sim_object.hh" +#include "sim/system.hh" #include "sim/stat_control.hh" #include "sim/stats.hh" #include "sim/root.hh" @@ -440,6 +441,17 @@ convertToBaseCPUPtr(SimObject *obj) return ptr; } +System * +convertToSystemPtr(SimObject *obj) +{ + System *ptr = dynamic_cast<System *>(obj); + + if (ptr == NULL) + warn("Casting to System pointer failed"); + return ptr; +} + + /** * Do C++ simulator exit processing. Exported to SWIG to be invoked * when simulator terminates via Python's atexit mechanism. |