X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ada1f047f064ed13e49641f80be122a952c4b11..3b2cba76f01c60f2dea5ff0b1cb0b30931f90748:/src/surf/disk_s19.cpp diff --git a/src/surf/disk_s19.cpp b/src/surf/disk_s19.cpp index 1066e62bc3..3d114ccbbb 100644 --- a/src/surf/disk_s19.cpp +++ b/src/surf/disk_s19.cpp @@ -31,11 +31,9 @@ DiskS19Model::DiskS19Model() all_existing_models.push_back(this); } -DiskImpl* DiskS19Model::createDisk(const std::string& id, double read_bw, double write_bw) +DiskImpl* DiskS19Model::create_disk() { - XBT_DEBUG("SURF disk create resource\n\t\tid '%s'\n\t\tread_bw '%f'\n", id.c_str(), read_bw); - - return new DiskS19(this, id, read_bw, write_bw); + return new DiskS19(); } double DiskS19Model::next_occurring_event(double now) @@ -62,21 +60,6 @@ void DiskS19Model::update_actions_state(double /*now*/, double delta) * Resource * ************/ -DiskS19::DiskS19(DiskModel* model, const std::string& name, double read_bw, double write_bw) - : DiskImpl(name) -{ - lmm::System* maxmin_system = model->get_maxmin_system(); - this->set_read_bandwidth(read_bw) - ->set_write_bandwidth(write_bw) - ->set_read_constraint(maxmin_system->constraint_new(this, read_bw)) - ->set_write_constraint(maxmin_system->constraint_new(this, write_bw)) - ->set_name(name) - ->set_model(model) - ->set_constraint(maxmin_system->constraint_new(this, std::max(read_bw, write_bw))); - XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", read_bw, write_bw); - DiskImpl::turn_on(); -} - DiskAction* DiskS19::io_start(sg_size_t size, s4u::Io::OpType type) { return new DiskS19Action(get_model(), static_cast(size), not is_on(), this, type);