Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement Exec::wait_any on top of ActivitySet and deprecate one method
[simgrid.git] / include / simgrid / s4u / Mutex.hpp
index 8418ca9a448f02dd11f8209a9d707f27e1c50d45..7791cd7e23e73f9e0f363144402971ea73c18789 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2023. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -9,8 +9,7 @@
 #include <simgrid/forward.h>
 #include <xbt/asserts.h>
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 /** @brief A classical mutex, but blocking in the simulation world.
  *
@@ -32,7 +31,7 @@ class XBT_PUBLIC Mutex {
 #ifndef DOXYGEN
   friend ConditionVariable;
   friend kernel::activity::MutexImpl;
-  friend void kernel::activity::intrusive_ptr_release(kernel::activity::MutexImpl* mutex);
+  friend XBT_PUBLIC void kernel::activity::intrusive_ptr_release(kernel::activity::MutexImpl* mutex);
 #endif
 
   kernel::activity::MutexImpl* const pimpl_;
@@ -48,14 +47,13 @@ class XBT_PUBLIC Mutex {
 #endif
 
 public:
-  /** Constructs a new mutex */
+  /** \static Constructs a new mutex */
   static MutexPtr create();
   void lock();
   void unlock();
   bool try_lock();
 };
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 #endif /* SIMGRID_S4U_MUTEX_HPP */