X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8cd2b8b1e341896e2b8c3e96eb3778316855504c..f23b0fb864cb60978c1fcfd48d50f62dd054fe31:/examples/s4u/mutex/s4u-mutex.cpp diff --git a/examples/s4u/mutex/s4u-mutex.cpp b/examples/s4u/mutex/s4u-mutex.cpp index b1e352334f..ae2ca42912 100644 --- a/examples/s4u/mutex/s4u-mutex.cpp +++ b/examples/s4u/mutex/s4u-mutex.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2018. 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. */ @@ -44,14 +44,15 @@ static void workerLockGuard(simgrid::s4u::MutexPtr mutex, int& result) static void master() { int result = 0; - simgrid::s4u::MutexPtr mutex = simgrid::s4u::Mutex::createMutex(); + simgrid::s4u::MutexPtr mutex = simgrid::s4u::Mutex::create(); for (int i = 0; i < NB_ACTOR * 2 ; i++) { // To create a worker use the static method simgrid::s4u::Actor. if((i % 2) == 0 ) - simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Jupiter"), workerLockGuard, mutex, std::ref(result)); + simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), workerLockGuard, mutex, + std::ref(result)); else - simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Tremblay"), worker, mutex, std::ref(result)); + simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Tremblay"), worker, mutex, std::ref(result)); } simgrid::s4u::this_actor::sleep_for(10); @@ -61,8 +62,8 @@ static void master() int main(int argc, char **argv) { simgrid::s4u::Engine e(&argc, argv); - e.loadPlatform("../../platforms/two_hosts.xml"); - simgrid::s4u::Actor::createActor("main", simgrid::s4u::Host::by_name("Tremblay"), master); + e.load_platform("../../platforms/two_hosts.xml"); + simgrid::s4u::Actor::create("main", simgrid::s4u::Host::by_name("Tremblay"), master); e.run(); return 0;