diff options
author | Benjamin Nash <benash@umich.edu> | 2005-06-29 11:17:12 -0400 |
---|---|---|
committer | Benjamin Nash <benash@umich.edu> | 2005-06-29 11:17:12 -0400 |
commit | eaeb1b6ff084b4797a31908fa5fb1d688c55dd60 (patch) | |
tree | 7a8e4d4bcd25f2f51c1020fedeff0f47449fd0c9 /sim/system.hh | |
parent | bc76a807af2a2a874be461f0c6be9a6c5ec8bfad (diff) | |
parent | 8a0bc840221cf7af4845f4ee44de11bc7271ff10 (diff) | |
download | gem5-eaeb1b6ff084b4797a31908fa5fb1d688c55dd60.tar.xz |
Merge m5read@m5.eecs.umich.edu:/bk/m5
into zed.eecs.umich.edu:/z/benash/bk/m5
--HG--
extra : convert_revision : a27bb3737d8a7d5c1fadf27f4cb5018d0b6054da
Diffstat (limited to 'sim/system.hh')
-rw-r--r-- | sim/system.hh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sim/system.hh b/sim/system.hh index ab6d264ea..870805e4c 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -58,6 +58,15 @@ class System : public SimObject uint64_t init_param; std::vector<ExecContext *> execContexts; + int numcpus; + + int getNumCPUs() + { + if (numcpus != execContexts.size()) + panic("cpu array not fully populated!"); + + return numcpus; + } /** kernel Symbol table */ SymbolTable *kernelSymtab; @@ -150,7 +159,7 @@ class System : public SimObject */ Addr getKernelEntry() const { return kernelEntry; } - int registerExecContext(ExecContext *xc); + int registerExecContext(ExecContext *xc, int xcIndex); void replaceExecContext(ExecContext *xc, int xcIndex); void regStats(); |