XBT_DEBUG("No more process to run");
next_context = static_cast<SerialBoostContext*>(BoostContext::getMaestro());
}
- SIMIX_context_set_current(static_cast<smx_context_t>(next_context));
+ SIMIX_context_set_current(next_context);
BoostContext::swap(this, next_context);
}
void ParallelBoostContext::run_all()
{
threads_working_ = 0;
- if (not parmap_)
+ if (parmap_ == nullptr)
parmap_ = new simgrid::xbt::Parmap<smx_actor_t>(SIMIX_context_get_nthreads(), SIMIX_context_get_parallel_mode());
parmap_->apply(
[](smx_actor_t process) {
ParallelBoostContext* context = static_cast<ParallelBoostContext*>(process->context);
- return context->resume();
+ context->resume();
},
simix_global->process_to_run);
}
xbt_os_thread_set_specific(worker_id_key_, reinterpret_cast<void*>(worker_id));
ParallelBoostContext* worker_context = static_cast<ParallelBoostContext*>(SIMIX_context_self());
- workers_context_[worker_id] = worker_context;
+ workers_context_[worker_id] = worker_context;
SIMIX_context_set_current(this);
BoostContext::swap(worker_context, this);
public:
BoostContextFactory();
~BoostContextFactory() override;
- Context* create_context(std::function<void()> code, void_pfn_smxprocess_t, smx_actor_t process) override;
+ Context* create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup, smx_actor_t process) override;
void run_all() override;
private:
bool parallel_;
};
-
}}} // namespace
#endif