summaryrefslogtreecommitdiff
path: root/src/cpu/translation.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-08-07 09:21:48 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-08-07 09:21:48 -0700
commit16882b04838c33e7de5456937b8b069547827b2a (patch)
tree52d9dadf5185a920a6fd1a1f3457180ba0086bc4 /src/cpu/translation.hh
parent720c0be620bd3427b5222e437fc7a82cb3a9ad7f (diff)
downloadgem5-16882b04838c33e7de5456937b8b069547827b2a.tar.xz
Translation: Use a pointer type as the template argument.
This allows regular pointers and reference counted pointers without having to use any shim structures or other tricks.
Diffstat (limited to 'src/cpu/translation.hh')
-rw-r--r--src/cpu/translation.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/translation.hh b/src/cpu/translation.hh
index 60953540f..b6bc2182c 100644
--- a/src/cpu/translation.hh
+++ b/src/cpu/translation.hh
@@ -214,21 +214,21 @@ class WholeTranslationState
* translation state class indicate that the whole translation is complete
* then the execution context is informed.
*/
-template <class ExecContext>
+template <class ExecContextPtr>
class DataTranslation : public BaseTLB::Translation
{
protected:
- ExecContext *xc;
+ ExecContextPtr xc;
WholeTranslationState *state;
int index;
public:
- DataTranslation(ExecContext *_xc, WholeTranslationState* _state)
+ DataTranslation(ExecContextPtr _xc, WholeTranslationState* _state)
: xc(_xc), state(_state), index(0)
{
}
- DataTranslation(ExecContext *_xc, WholeTranslationState* _state,
+ DataTranslation(ExecContextPtr _xc, WholeTranslationState* _state,
int _index)
: xc(_xc), state(_state), index(_index)
{