Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
docs: start writing the S4U part
[simgrid.git] / include / simgrid / s4u / Mutex.hpp
index b30de03..5feed70 100644 (file)
@@ -29,8 +29,9 @@ class ConditionVariable;
  *
  */
 class XBT_PUBLIC Mutex {
-  friend ConditionVariable;
+  friend simgrid::s4u::ConditionVariable;
   friend simgrid::kernel::activity::MutexImpl;
+
   simgrid::kernel::activity::MutexImpl* pimpl_;
   explicit Mutex(simgrid::kernel::activity::MutexImpl* mutex) : pimpl_(mutex) {}
 
@@ -39,8 +40,6 @@ class XBT_PUBLIC Mutex {
   friend XBT_PUBLIC void intrusive_ptr_release(Mutex* mutex);
 
 public:
-  using Ptr = boost::intrusive_ptr<Mutex>;
-
   // No copy:
   /** You cannot create a new mutex by copying an existing one. Use MutexPtr instead */
   Mutex(Mutex const&) = delete;
@@ -48,18 +47,17 @@ public:
   Mutex& operator=(Mutex const&) = delete;
 
   /** Constructs a new mutex */
-  static Ptr create();
+  static MutexPtr create();
 
   void lock();
   void unlock();
   bool try_lock();
 
   // deprecated
-  XBT_ATTRIB_DEPRECATED_v323("Please use Mutex::create()") static Ptr createMutex() { return create(); }
+  /** @deprecated Mutex::create() */
+  XBT_ATTRIB_DEPRECATED_v323("Please use Mutex::create()") static MutexPtr createMutex() { return create(); }
 };
 
-using MutexPtr = Mutex::Ptr;
-
 }} // namespace simgrid::s4u
 
 #endif /* SIMGRID_S4U_MUTEX_HPP */