/******************************** 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)
{
xbt_dict_t properties, smx_actor_t parent_process)
{
msg_process_t p = MSG_process_create_from_stdfunc(name, std::move(code), data, host, properties);
- return p ? p->getImpl() : nullptr;
+ return p == nullptr ? nullptr : p->getImpl();
}
/** \ingroup m_process_management
{
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]);