using RawImplPtr = boost::intrusive_ptr<RawImpl>;
class SemaphoreImpl;
using SemaphoreImplPtr = boost::intrusive_ptr<SemaphoreImpl>;
+ XBT_PUBLIC void intrusive_ptr_add_ref(SemaphoreImpl* sem);
+ XBT_PUBLIC void intrusive_ptr_release(SemaphoreImpl* sem);
class SleepImpl;
using SleepImplPtr = boost::intrusive_ptr<SleepImpl>;
*/
class XBT_PUBLIC Semaphore {
friend kernel::activity::SemaphoreImpl;
+ friend void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem);
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