Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix msg-process-join.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 1 Aug 2017 21:13:30 +0000 (23:13 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 1 Aug 2017 21:16:26 +0000 (23:16 +0200)
On exit, call SIMIX_process_join_finish in maestro context.

src/simix/ActorImpl.cpp

index 318e5ed..6bd02ca 100644 (file)
@@ -723,7 +723,12 @@ smx_activity_t SIMIX_process_join(smx_actor_t issuer, smx_actor_t process, doubl
    * The C API should first be properly replaced with the C++ one, which is a fair amount of work.
    */
   intrusive_ptr_add_ref(process);
    * The C API should first be properly replaced with the C++ one, which is a fair amount of work.
    */
   intrusive_ptr_add_ref(process);
-  SIMIX_process_on_exit(process, (int_f_pvoid_pvoid_t)SIMIX_process_join_finish, &*res);
+  SIMIX_process_on_exit(process,
+                        [](void*, void* arg) {
+                          return simgrid::simix::kernelImmediate(
+                              [&] { return SIMIX_process_join_finish(SMX_EXIT_SUCCESS, arg); });
+                        },
+                        &*res);
   return res;
 }
 
   return res;
 }