Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No need to make a simcall on mutex creation.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Jan 2021 14:05:53 +0000 (15:05 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Jan 2021 14:16:14 +0000 (15:16 +0100)
src/s4u/s4u_Mutex.cpp

index 2bec1c8..6034aeb 100644 (file)
@@ -44,7 +44,7 @@ bool Mutex::try_lock()
  */
 MutexPtr Mutex::create()
 {
-  kernel::activity::MutexImpl* mutex = kernel::actor::simcall([] { return new kernel::activity::MutexImpl(); });
+  auto* mutex = new kernel::activity::MutexImpl();
   return MutexPtr(&mutex->mutex(), false);
 }