diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-04-06 10:19:36 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-04-06 10:19:36 -0700 |
commit | d080581db1f9ee4e1e6d07d2b01c13c67908a391 (patch) | |
tree | cc484b289fa5a30c4631f9faa1d8b456bffeebfc /src/sim/system.hh | |
parent | 7a7c4c5fca83a8d47c7e71c9c080a882ebe204a9 (diff) | |
parent | 639cb0a42d953ee32bc7e96b0cdfa96cd40e9fc1 (diff) | |
download | gem5-d080581db1f9ee4e1e6d07d2b01c13c67908a391.tar.xz |
Merge ARM into the head. ARM will compile but may not actually work.
Diffstat (limited to 'src/sim/system.hh')
-rw-r--r-- | src/sim/system.hh | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/sim/system.hh b/src/sim/system.hh index cdd5bebb0..bfa5ea8bb 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -87,14 +87,19 @@ class System : public SimObject PCEventQueue pcEventQueue; std::vector<ThreadContext *> threadContexts; - int numcpus; + int _numContexts; - int getNumCPUs() + ThreadContext * getThreadContext(int tid) { - if (numcpus != threadContexts.size()) + return threadContexts[tid]; + } + + int numContexts() + { + if (_numContexts != threadContexts.size()) panic("cpu array not fully populated!"); - return numcpus; + return _numContexts; } #if FULL_SYSTEM @@ -134,6 +139,12 @@ class System : public SimObject return next_PID++; } + /** Amount of physical memory that is still free */ + Addr freeMemSize(); + + /** Amount of physical memory that exists */ + Addr memSize(); + #endif // FULL_SYSTEM @@ -219,8 +230,8 @@ class System : public SimObject #endif // FULL_SYSTEM - int registerThreadContext(ThreadContext *tc, int tcIndex); - void replaceThreadContext(ThreadContext *tc, int tcIndex); + int registerThreadContext(ThreadContext *tc, int assigned=-1); + void replaceThreadContext(ThreadContext *tc, int context_id); void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion); |