X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/91fe7904c884b2d0f5e7408d6e9d1d99886bd365..40ee10e13b61bfb28374d96ade010a262b5abd44:/include/simgrid/s4u/Semaphore.hpp diff --git a/include/simgrid/s4u/Semaphore.hpp b/include/simgrid/s4u/Semaphore.hpp index 974a1e2d9c..4c16f7ae9c 100644 --- a/include/simgrid/s4u/Semaphore.hpp +++ b/include/simgrid/s4u/Semaphore.hpp @@ -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. */ @@ -8,8 +8,7 @@ #include -namespace simgrid { -namespace s4u { +namespace simgrid::s4u { /** @brief A classical semaphore, but blocking in the simulation world * @@ -30,13 +29,13 @@ namespace s4u { class XBT_PUBLIC Semaphore { #ifndef DOXYGEN friend kernel::activity::SemaphoreImpl; - friend void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem); + friend XBT_PUBLIC void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem); #endif kernel::activity::SemaphoreImpl* const pimpl_; - friend void intrusive_ptr_add_ref(const Semaphore* sem); - friend void intrusive_ptr_release(const Semaphore* sem); + friend XBT_PUBLIC void intrusive_ptr_add_ref(const Semaphore* sem); + friend XBT_PUBLIC void intrusive_ptr_release(const Semaphore* sem); explicit Semaphore(kernel::activity::SemaphoreImpl* sem) : pimpl_(sem) {} ~Semaphore() = default; @@ -46,7 +45,7 @@ class XBT_PUBLIC Semaphore { #endif public: - /** Constructs a new semaphore */ + /** \static Constructs a new semaphore */ static SemaphorePtr create(unsigned int initial_capacity); void acquire(); @@ -57,7 +56,6 @@ public: bool would_block() const; }; -} // namespace s4u -} // namespace simgrid +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_SEMAPHORE_HPP */