XBT_LOG_NEW_DEFAULT_CATEGORY(simix, "transmuting from user request into kernel handlers");
-constexpr std::array<const char*, simgrid::simix::NUM_SIMCALLS> simcall_names{{
- "Simcall::NONE",
- "Simcall::RUN_ANSWERED",
- "Simcall::RUN_BLOCKING",
-}};
-
/** @private
* @brief (in kernel mode) unpack the simcall and activate the handler
*
cname += 17; // strip prefix "simgrid::kernel::"
return cname;
} else {
- return simcall_names.at(static_cast<int>(simcall.call_));
+ return to_c_str(simcall.call_);
}
}
namespace simgrid {
namespace simix {
/** All possible simcalls. */
-enum class Simcall {
- NONE,
- RUN_ANSWERED,
- RUN_BLOCKING,
-};
-constexpr int NUM_SIMCALLS = 3;
+XBT_DECLARE_ENUM_CLASS(Simcall, NONE, RUN_ANSWERED, RUN_BLOCKING);
} // namespace simix
} // namespace simgrid