-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2022. 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. */
#define SIMGRID_S4U_SEMAPHORE_HPP
#include <simgrid/forward.h>
-#include <simgrid/simix.h>
namespace simgrid {
namespace s4u {
*
*/
class XBT_PUBLIC Semaphore {
+#ifndef DOXYGEN
friend kernel::activity::SemaphoreImpl;
+ friend void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem);
+#endif
kernel::activity::SemaphoreImpl* const pimpl_;
friend void intrusive_ptr_release(const Semaphore* sem);
explicit Semaphore(kernel::activity::SemaphoreImpl* sem) : pimpl_(sem) {}
+ ~Semaphore() = default;
#ifndef DOXYGEN
Semaphore(Semaphore const&) = delete; // No copy constructor. Use SemaphorePtr instead
Semaphore& operator=(Semaphore const&) = delete; // No direct assignment either. Use SemaphorePtr instead