From: Arnaud Giersch Date: Wed, 27 Jan 2021 14:05:53 +0000 (+0100) Subject: No need to make a simcall on mutex creation. X-Git-Tag: v3.27~505 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3a40c8147d6fd8e2f8bc336ad15e95209abaf70e No need to make a simcall on mutex creation. --- diff --git a/src/s4u/s4u_Mutex.cpp b/src/s4u/s4u_Mutex.cpp index 2bec1c841d..6034aeb2e0 100644 --- a/src/s4u/s4u_Mutex.cpp +++ b/src/s4u/s4u_Mutex.cpp @@ -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); }