Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Automatic refcounting on the src and dst actors of a comm
[simgrid.git] / src / kernel / activity / CommImpl.cpp
index 7d9bd69..b2a0f01 100644 (file)
@@ -1,12 +1,12 @@
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/activity/CommImpl.hpp"
 #include "simgrid/kernel/resource/Action.hpp"
-
 #include "simgrid/modelchecker.h"
+#include "src/kernel/activity/MailboxImpl.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/simix/smx_network_private.hpp"
 #include "src/surf/surf_interface.hpp"
@@ -97,21 +97,21 @@ void simgrid::kernel::activity::CommImpl::cleanupSurf()
 void simgrid::kernel::activity::CommImpl::post()
 {
   /* Update synchro state */
-  if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
+  if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::FINISHED)
     state_ = SIMIX_SRC_TIMEOUT;
-  else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
+  else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::FINISHED)
     state_ = SIMIX_DST_TIMEOUT;
-  else if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
+  else if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::FAILED)
     state_ = SIMIX_SRC_HOST_FAILURE;
-  else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
+  else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::FAILED)
     state_ = SIMIX_DST_HOST_FAILURE;
-  else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) {
+  else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::FAILED) {
     state_ = SIMIX_LINK_FAILURE;
   } else
     state_ = SIMIX_DONE;
 
-  XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d", this, (int)state_, src_proc,
-            dst_proc, detached);
+  XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d", this, (int)state_,
+            src_proc.get(), dst_proc.get(), detached);
 
   /* destroy the surf actions associated with the Simix communication */
   cleanupSurf();