Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move the conditionVariable observer to the right file
[simgrid.git] / src / kernel / actor / SynchroObserver.cpp
index 4382ec4..1dff82a 100644 (file)
@@ -106,4 +106,22 @@ bool BarrierObserver::is_enabled()
          (type_ == mc::Transition::Type::BARRIER_WAIT && acquisition_ != nullptr && acquisition_->granted_);
 }
 
+bool ConditionWaitSimcall::is_enabled()
+{
+  if (static bool warned = false; not warned) {
+    XBT_INFO("Using condition variables in model-checked code is still experimental. Use at your own risk");
+    warned = true;
+  }
+  return true;
+}
+void ConditionWaitSimcall::serialize(std::stringstream& stream) const
+{
+  THROW_UNIMPLEMENTED;
+}
+std::string ConditionWaitSimcall::to_string() const
+{
+  return "ConditionWait(cond_id:" + ptr_to_id<activity::ConditionVariableImpl const>(get_cond()) +
+         " mutex_id:" + std::to_string(get_mutex()->get_id()) + ")";
+}
+
 } // namespace simgrid::kernel::actor