diff options
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r-- | src/cpu/base.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh index 6552be0d6..633b7f2a7 100644 --- a/src/cpu/base.hh +++ b/src/cpu/base.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 ARM Limited + * Copyright (c) 2011-2012 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -114,6 +114,9 @@ class BaseCPU : public MemObject * used to generate a taskId */ uint32_t _pid; + /** Is the CPU switched out or active? */ + bool _switchedOut; + /** * Define a base class for the CPU ports (instruction and data) * that is refined in the subclasses. This class handles the @@ -321,6 +324,13 @@ class BaseCPU : public MemObject virtual void takeOverFrom(BaseCPU *cpu); /** + * Determine if the CPU is switched out. + * + * @return True if the CPU is switched out, false otherwise. + */ + bool switchedOut() const { return _switchedOut; } + + /** * Number of threads we're actually simulating (<= SMT_MAX_THREADS). * This is a constant for the duration of the simulation. */ |