projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
types: need typename keyword to get the type.
[gem5.git]
/
src
/
dev
/
baddev.hh
diff --git
a/src/dev/baddev.hh
b/src/dev/baddev.hh
index d7d778af47286c1fc348afee2b20fb2c49921f94..9cf592c0ef5fb5cb90d6bf4388eceff5d68bcc57 100644
(file)
--- a/
src/dev/baddev.hh
+++ b/
src/dev/baddev.hh
@@
-38,7
+38,7
@@
#include "base/range.hh"
#include "dev/io_device.hh"
#include "base/range.hh"
#include "dev/io_device.hh"
-
+#include "params/BadDevice.hh"
/**
* BadDevice
/**
* BadDevice
@@
-52,12
+52,14
@@
class BadDevice : public BasicPioDevice
std::string devname;
public:
std::string devname;
public:
- struct Params : public BasicPioDevice::Params
- {
- std::string device_name;
- };
+ typedef BadDeviceParams Params;
+
protected:
protected:
- const Params *params() const { return (const Params *)_params; }
+ const Params *
+ params() const
+ {
+ return dynamic_cast<const Params *>(_params);
+ }
public:
/**
public:
/**
@@
-67,8
+69,8
@@
class BadDevice : public BasicPioDevice
*/
BadDevice(Params *p);
*/
BadDevice(Params *p);
- virtual Tick read(Packet
*
pkt);
- virtual Tick write(Packet
*
pkt);
+ virtual Tick read(Packet
Ptr
pkt);
+ virtual Tick write(Packet
Ptr
pkt);
};
#endif // __DEV_BADDEV_HH__
};
#endif // __DEV_BADDEV_HH__