Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into xbt_random
[simgrid.git] / examples / s4u / synchro-mutex / s4u-synchro-mutex.cpp
index ae2ca42..f518817 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2019. 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. */
@@ -6,7 +6,7 @@
 #include <mutex> /* std::mutex and std::lock_guard */
 #include "simgrid/s4u.hpp" /* All of S4U */
 
-#define NB_ACTOR 6
+constexpr int NB_ACTOR = 6;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");
 
@@ -17,7 +17,7 @@ static void worker(simgrid::s4u::MutexPtr mutex, int& result)
   mutex->lock();
 
   XBT_INFO("Hello s4u, I'm ready to compute after a regular lock");
-  // And finaly add it to the results
+  // And finally add it to the results
   result += 1;
   XBT_INFO("I'm done, good bye");