Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove dead code after exception throw.
[simgrid.git] / src / kernel / activity / MutexImpl.cpp
index 80fa3d5..624c80b 100644 (file)
@@ -96,25 +96,23 @@ void MutexImpl::unlock(smx_actor_t issuer)
   }
   XBT_OUT();
 }
-}
-}
-}
-
 /** Increase the refcount for this mutex */
-smx_mutex_t SIMIX_mutex_ref(smx_mutex_t mutex)
+MutexImpl* MutexImpl::ref()
 {
-  if (mutex != nullptr)
-    intrusive_ptr_add_ref(mutex);
-  return mutex;
+  intrusive_ptr_add_ref(this);
+  return this;
 }
 
 /** Decrease the refcount for this mutex */
-void SIMIX_mutex_unref(smx_mutex_t mutex)
+void MutexImpl::unref()
 {
-  if (mutex != nullptr)
-    intrusive_ptr_release(mutex);
+  intrusive_ptr_release(this);
 }
 
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
+
 // Simcall handlers:
 
 void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)