Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:simgrid/simgrid into dev_8
[simgrid.git] / src / simix / popping_generated.cpp
index 5cc7d51..aa1a849 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include "smx_private.hpp"
+#include <simgrid/host.h>
 #include <xbt/base.h>
 #if SIMGRID_HAVE_MC
 #include "src/mc/mc_forward.hpp"
@@ -24,7 +25,7 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
 /** @brief Simcalls' names (generated from src/simix/simcalls.in) */
-const char* simcall_names[] = {
+constexpr std::array<const char*, NUM_SIMCALLS> simcall_names{{
     "SIMCALL_NONE",
     "SIMCALL_EXECUTION_WAITANY_FOR",
     "SIMCALL_COMM_SEND",
@@ -45,7 +46,7 @@ const char* simcall_names[] = {
     "SIMCALL_MC_RANDOM",
     "SIMCALL_RUN_KERNEL",
     "SIMCALL_RUN_BLOCKING",
-};
+}};
 
 /** @private
  * @brief (in kernel mode) unpack the simcall and activate the handler
@@ -140,8 +141,6 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int value) {
       SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall_.args_[0]));
       break;
 
-    case NUM_SIMCALLS:
-      break;
     case SIMCALL_NONE:
       throw std::invalid_argument(simgrid::xbt::string_printf("Asked to do the noop syscall on %s@%s",
                                                               get_cname(),