Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git] / src / s4u / s4u_mutex.cpp
index 9e0e5d5..7e0e852 100644 (file)
@@ -3,7 +3,7 @@
 /* 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. */
 
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
 #include "src/simix/smx_synchro_private.hpp"
 #include "xbt/log.h"
 
@@ -24,8 +24,7 @@ void Mutex::lock()
  */
 void Mutex::unlock()
 {
-  smx_actor_t self = SIMIX_process_self();
-  simgrid::simix::kernelImmediate([this, self] { return mutex_->unlock(self); });
+  simcall_mutex_unlock(mutex_);
 }
 
 /** @brief Acquire the mutex if it's free, and return false (without blocking) if not */