Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename the CondVar observer as it should
[simgrid.git] / src / kernel / actor / SynchroObserver.cpp
index 4382ec4..50a4ce3 100644 (file)
@@ -106,4 +106,22 @@ bool BarrierObserver::is_enabled()
          (type_ == mc::Transition::Type::BARRIER_WAIT && acquisition_ != nullptr && acquisition_->granted_);
 }
 
+bool ConditionVariableObserver::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 ConditionVariableObserver::serialize(std::stringstream& stream) const
+{
+  THROW_UNIMPLEMENTED;
+}
+std::string ConditionVariableObserver::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