+void ParallelThreadContext::run_all(std::vector<actor::ActorImpl*> const& actors_list)
+{
+ for (auto const* actor : actors_list)
+ static_cast<ThreadContext*>(actor->context_.get())->release();
+
+ for (auto const* actor : actors_list)
+ static_cast<ThreadContext*>(actor->context_.get())->wait();
+}
+
+void ParallelThreadContext::start_hook()
+{
+ if (not is_maestro()) /* parallel run */
+ thread_sem_->acquire();
+}
+
+void ParallelThreadContext::yield_hook()
+{
+ if (not is_maestro()) /* parallel run */
+ thread_sem_->release();
+}
+
+XBT_PRIVATE ContextFactory* thread_factory()
+{
+ XBT_VERB("Activating thread context factory");
+ return new ThreadContextFactory();
+}
+} // namespace simgrid::kernel::context