diff options
author | Miles Kaufmann <milesck@eecs.umich.edu> | 2007-08-30 15:16:59 -0400 |
---|---|---|
committer | Miles Kaufmann <milesck@eecs.umich.edu> | 2007-08-30 15:16:59 -0400 |
commit | 54cc0053f0a6822e47a49771976af6daaabc24bb (patch) | |
tree | 72e6c7879de698347832e1e1475afbb9c1be2b70 /src/dev/ide_disk.cc | |
parent | 9cb49ab9e0ff8917d20fd7dc81be3ce5ecc81bd8 (diff) | |
download | gem5-54cc0053f0a6822e47a49771976af6daaabc24bb.tar.xz |
params: Deprecate old-style constructors; update most SimObject constructors.
SimObjects not yet updated:
- Process and subclasses
- BaseCPU and subclasses
The SimObject(const std::string &name) constructor was removed. Subclasses
that still rely on that behavior must call the parent initializer as
: SimObject(makeParams(name))
--HG--
extra : convert_revision : d6faddde76e7c3361ebdbd0a7b372a40941c12ed
Diffstat (limited to 'src/dev/ide_disk.cc')
-rw-r--r-- | src/dev/ide_disk.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/dev/ide_disk.cc b/src/dev/ide_disk.cc index cfd743a13..8f9999beb 100644 --- a/src/dev/ide_disk.cc +++ b/src/dev/ide_disk.cc @@ -45,22 +45,20 @@ #include "dev/disk_image.hh" #include "dev/ide_ctrl.hh" #include "dev/ide_disk.hh" -#include "params/IdeDisk.hh" #include "sim/core.hh" #include "sim/sim_object.hh" using namespace std; using namespace TheISA; -IdeDisk::IdeDisk(const string &name, DiskImage *img, - int id, Tick delay) - : SimObject(name), ctrl(NULL), image(img), diskDelay(delay), +IdeDisk::IdeDisk(const Params *p) + : SimObject(p), ctrl(NULL), image(p->image), diskDelay(p->delay), dmaTransferEvent(this), dmaReadCG(NULL), dmaReadWaitEvent(this), dmaWriteCG(NULL), dmaWriteWaitEvent(this), dmaPrdReadEvent(this), dmaReadEvent(this), dmaWriteEvent(this) { // Reset the device state - reset(id); + reset(p->driveID); // fill out the drive ID structure memset(&driveID, 0, sizeof(struct ataparams)); @@ -1117,5 +1115,5 @@ IdeDisk::unserialize(Checkpoint *cp, const string §ion) IdeDisk * IdeDiskParams::create() { - return new IdeDisk(name, image, driveID, delay); + return new IdeDisk(this); } |