if (not code) {
maestro->context_ = SIMIX_context_new(simgrid::simix::ActorCode(), nullptr, maestro);
} else {
- if (not simix_global)
- xbt_die("simix is not initialized, please call MSG_init first");
maestro->context_ = simix_global->context_factory->create_maestro(code, maestro);
}
*/
smx_mutex_t simcall_mutex_init()
{
- if (not simix_global) {
- fprintf(stderr,"You must run MSG_init before using MSG\n"); // We can't use xbt_die since we may get there before the initialization
+ if (simix_global == nullptr) {
+ fprintf(stderr, "You must initialize the SimGrid engine before using it\n"); // We can't use xbt_die since we may
+ // get there before the initialization
xbt_abort();
}
return simgrid::simix::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
simgrid::mc::Client::initialize();
#endif
- if (not simix_global) {
+ if (simix_global == nullptr) {
simix_global = std::unique_ptr<simgrid::simix::Global>(new simgrid::simix::Global());
simix_global->maestro_process = nullptr;