} // namespace kernel
} // namespace simgrid
-/* needs to be public and without simcall because it is called
- by exceptions and logging events */
+/* needs to be public and without simcall because it is called by exceptions and logging events */
const char* SIMIX_process_self_get_name()
{
return SIMIX_is_maestro() ? "maestro" : simgrid::kernel::actor::ActorImpl::self()->get_cname();
{
return simgrid::kernel::actor::ActorImpl::by_pid(pid);
}
+
+int SIMIX_is_maestro()
+{
+ const auto* self = simgrid::kernel::actor::ActorImpl::self();
+ return self == nullptr || simgrid::kernel::EngineImpl::get_instance()->is_maestro(self);
+}