{
return this->process_;
}
+ void set_cleanup(void_pfn_smxprocess_t cleanup)
+ {
+ cleanup_func_ = cleanup;
+ }
// Virtual methods
virtual ~Context();
#include <src/simix/smx_private.h>
+void SIMIX_process_set_cleanup_function(
+ smx_process_t process, void_pfn_smxprocess_t cleanup)
+{
+ process->context->set_cleanup(cleanup);
+}
+
namespace simgrid {
namespace simix {
XBT_PRIVATE void SIMIX_post_create_environment(void);
+// FIXME, Dirty hack for SMPI+MSG
+XBT_PRIVATE void SIMIX_process_set_cleanup_function(
+ smx_process_t process, void_pfn_smxprocess_t cleanup);
+
SG_END_DECL()
#endif
if (argc && argv) {
proc = SIMIX_process_self();
//FIXME: dirty cleanup method to avoid using msg cleanup functions on these processes when using MSG+SMPI
- // proc->context->cleanup_func=SIMIX_process_cleanup;
+ SIMIX_process_set_cleanup_function(proc, SIMIX_process_cleanup);
char* instance_id = (*argv)[1];
int rank = atoi((*argv)[2]);
index = smpi_process_index_of_smx_process(proc);