Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[simgrid.git] / src / msg / msg_process.cpp
index 7943aeb..eda8149 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "msg_private.h"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Host.hpp"
 #include "src/simix/ActorImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)");
@@ -22,8 +22,8 @@ SG_BEGIN_DECL()
 
 /******************************** Process ************************************/
 /**
- * \brief Cleans the MSG data of a process.
- * \param smx_proc a SIMIX process
+ * \brief Cleans the MSG data of an actor
+ * \param smx_actor a SIMIX actor
  */
 void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_actor)
 {
@@ -121,7 +121,8 @@ msg_process_t MSG_process_create_with_environment(const char *name, xbt_main_fun
 {
   std::function<void()> function;
   if (code)
-    function = simgrid::xbt::wrapMain(code, argc, const_cast<const char*const*>(argv));
+    function = simgrid::xbt::wrapMain(code, argc, static_cast<const char* const*>(argv));
+
   msg_process_t res = MSG_process_create_from_stdfunc(name, std::move(function), data, host, properties);
   for (int i = 0; i != argc; ++i)
     xbt_free(argv[i]);
@@ -139,7 +140,7 @@ msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<vo
 
   smx_actor_t process = simcall_process_create(name, std::move(code), msgExt, host, properties);
 
-  if (!process) { /* Undo everything */
+  if (not process) { /* Undo everything */
     delete msgExt;
     return nullptr;
   }
@@ -163,7 +164,7 @@ msg_process_t MSG_process_attach(const char *name, void *data, msg_host_t host,
 
   /* Let's create the process: SIMIX may decide to start it right now, even before returning the flow control to us */
   smx_actor_t process = SIMIX_process_attach(name, new simgrid::MsgActorExt(data), host->cname(), properties, nullptr);
-  if (!process)
+  if (not process)
     xbt_die("Could not attach");
   simcall_process_on_exit(process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,process);
   return process->ciface();