Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Specialize parameter for simcall comm_waitany.
[simgrid.git] / src / kernel / activity / MutexImpl.cpp
index 538e418..80fa3d5 100644 (file)
@@ -5,7 +5,6 @@
 
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
-#include "src/simix/smx_synchro_private.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_mutex, simix_synchro, "Mutex kernel-space implementation");
 
@@ -29,12 +28,12 @@ void MutexImpl::lock(smx_actor_t issuer)
 {
   XBT_IN("(%p; %p)", this, issuer);
   /* FIXME: check where to validate the arguments */
-  smx_activity_t synchro = nullptr;
+  RawImplPtr synchro = nullptr;
 
   if (this->locked) {
     /* FIXME: check if the host is active ? */
     /* Somebody using the mutex, use a synchronization to get host failures */
-    synchro = SIMIX_synchro_wait(issuer->get_host(), -1);
+    synchro = RawImplPtr(new RawImpl())->start(issuer->get_host(), -1);
     synchro->simcalls_.push_back(&issuer->simcall);
     issuer->waiting_synchro = synchro;
     this->sleeping.push_back(*issuer);