Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sort Context files
[simgrid.git] / src / simix / smx_process.cpp
index 17541e9..82b4d16 100644 (file)
@@ -38,7 +38,7 @@ smx_process_t SIMIX_process_self(void)
 {
   smx_context_t self_context = SIMIX_context_self();
 
-  return self_context ? SIMIX_context_get_process(self_context) : NULL;
+  return self_context ? self_context->process() : NULL;
 }
 
 /**
@@ -81,10 +81,10 @@ void SIMIX_process_cleanup(smx_process_t process)
       comm->src_proc = NULL;
 
       /* I'm not supposed to destroy a detached comm from the sender side, */
-      if (!comm->detached)
-        SIMIX_comm_destroy(comm);
+      if (comm->detached)
+        XBT_DEBUG("Don't destroy it since it's a detached comm and I'm the sender");
       else
-        XBT_DEBUG("Don't destroy it since it's a detached comm");
+        SIMIX_comm_destroy(comm);
 
     }
     else if (comm->dst_proc == process){