X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/149c63f36e15b8500b1e826bda5138318ff7ba2b..2d30a417c2362b797b83c98f038a47a655a07180:/teshsuite/s4u/concurrent_rw/concurrent_rw.cpp diff --git a/teshsuite/s4u/concurrent_rw/concurrent_rw.cpp b/teshsuite/s4u/concurrent_rw/concurrent_rw.cpp index 5edb401efd..ee7b828a06 100644 --- a/teshsuite/s4u/concurrent_rw/concurrent_rw.cpp +++ b/teshsuite/s4u/concurrent_rw/concurrent_rw.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,21 +9,21 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u test"); static void host() { - simgrid::s4u::Disk* disk = simgrid::s4u::this_actor::get_host()->get_disks().front(); // Disk1 - int id = simgrid::s4u::this_actor::get_pid(); - XBT_INFO("process %d is writing!", id); + const simgrid::s4u::Disk* disk = simgrid::s4u::this_actor::get_host()->get_disks().front(); // Disk1 + aid_t id = simgrid::s4u::this_actor::get_pid(); + XBT_INFO("process %ld is writing!", id); disk->write(4000000); - XBT_INFO("process %d goes to sleep for %d seconds", id, id); - simgrid::s4u::this_actor::sleep_for(id); - XBT_INFO("process %d is writing again!", id); + XBT_INFO("process %ld goes to sleep for %ld seconds", id, id); + simgrid::s4u::this_actor::sleep_for(static_cast(id)); + XBT_INFO("process %ld is writing again!", id); disk->write(4000000); - XBT_INFO("process %d goes to sleep for %d seconds", id, 6 - id); - simgrid::s4u::this_actor::sleep_for(6 - id); - XBT_INFO("process %d is reading!", id); + XBT_INFO("process %ld goes to sleep for %ld seconds", id, 6 - id); + simgrid::s4u::this_actor::sleep_for(static_cast(6 - id)); + XBT_INFO("process %ld is reading!", id); disk->read(4000000); - XBT_INFO("process %d goes to sleep for %d seconds", id, id); - simgrid::s4u::this_actor::sleep_for(id); - XBT_INFO("process %d is reading again!", id); + XBT_INFO("process %ld goes to sleep for %ld seconds", id, id); + simgrid::s4u::this_actor::sleep_for(static_cast(id)); + XBT_INFO("process %ld is reading again!", id); disk->read(4000000); } @@ -36,7 +36,7 @@ int main(int argc, char** argv) simgrid::s4u::Actor::create("host", simgrid::s4u::Host::by_name("bob"), host); e.run(); - XBT_INFO("Simulation time %g", e.get_clock()); + XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock()); return 0; }