]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/SemaphoreImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill some remains of the pre-C++ era
[simgrid.git] / src / kernel / activity / SemaphoreImpl.cpp
index 4214b1608b130ecddc5db972e6070fa822397196..021ef85150946e74973a87725162435c86ccf717 100644 (file)
@@ -1,10 +1,10 @@
-/* Copyright (c) 2019-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-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. */
 
 #include "src/kernel/activity/SemaphoreImpl.hpp"
-#include "src/kernel/activity/SynchroRaw.hpp"
+#include "src/kernel/activity/Synchro.hpp"
 #include "src/kernel/actor/SimcallObserver.hpp"
 #include <cmath> // std::isfinite
 
@@ -20,7 +20,7 @@ void SemaphoreImpl::acquire(actor::ActorImpl* issuer, double timeout)
   xbt_assert(std::isfinite(timeout), "timeout is not finite!");
 
   if (value_ <= 0) {
-    RawImplPtr synchro(new RawImpl([this, issuer]() {
+    SynchroImplPtr synchro(new SynchroImpl([this, issuer]() {
       this->remove_sleeping_actor(*issuer);
       auto* observer = dynamic_cast<kernel::actor::SemAcquireSimcall*>(issuer->simcall_.observer_);
       xbt_assert(observer != nullptr);
@@ -48,19 +48,6 @@ void SemaphoreImpl::release()
   }
 }
 
-/** Increase the refcount for this semaphore */
-SemaphoreImpl* SemaphoreImpl::ref()
-{
-  intrusive_ptr_add_ref(this);
-  return this;
-}
-
-/** Decrease the refcount for this mutex */
-void SemaphoreImpl::unref()
-{
-  intrusive_ptr_release(this);
-}
-
 } // namespace activity
 } // namespace kernel
 } // namespace simgrid