-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2022. 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. */
{
XBT_INFO("Entering the race...");
std::unique_lock<simgrid::s4u::Mutex> lck(*mtx);
- while (!ready) {
+ while (not ready) {
auto now = simgrid::s4u::Engine::get_clock();
if (cv->wait_until(lck, now + (id+1)*0.25) == std::cv_status::timeout) {
XBT_INFO("Out of wait_until (timeout)");
simgrid::s4u::Engine e(&argc, argv);
e.load_platform("../../platforms/small_platform.xml");
- auto host = simgrid::s4u::Host::by_name("Tremblay");
- simgrid::s4u::Actor::create("main", host, main_actor);
+ simgrid::s4u::Actor::create("main", e.host_by_name("Tremblay"), main_actor);
e.run();
return 0;