Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Const etc. (round #3).
[simgrid.git] / src / msg / msg_legacy.cpp
index 3e25d76..a255124 100644 (file)
@@ -55,7 +55,9 @@ int MSG_task_listen(const char* alias)
 /* ************************** Actors *************************** */
 void MSG_process_on_exit(int_f_int_pvoid_t fun, void* data)
 {
-  sg_actor_on_exit(fun, data);
+  /* We can't use the sg_actor_on_exit, as the return type of the callback changed: the int in MSG is ignored and was
+   * removed in sg */
+  simgrid::s4u::this_actor::on_exit([fun, data](bool failed) { fun(failed ? 1 /*FAILURE*/ : 0 /*SUCCESS*/, data); });
 }
 
 int MSG_process_get_PID(const_sg_actor_t actor)
@@ -94,7 +96,7 @@ void MSG_process_resume(sg_actor_t actor)
 {
   sg_actor_resume(actor);
 }
-int MSG_process_is_suspended(sg_actor_t actor)
+int MSG_process_is_suspended(const_sg_actor_t actor)
 {
   return sg_actor_is_suspended(actor);
 }