Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make more sense
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 3 Apr 2019 09:36:05 +0000 (11:36 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 3 Apr 2019 09:36:05 +0000 (11:36 +0200)
src/kernel/activity/ActivityImpl.cpp
src/kernel/actor/ActorImpl.cpp

index da8f12d..5454050 100644 (file)
@@ -53,6 +53,7 @@ void ActivityImpl::cancel()
   XBT_VERB("Activity %p is canceled", this);
   if (surf_action_ != nullptr)
     surf_action_->cancel();
   XBT_VERB("Activity %p is canceled", this);
   if (surf_action_ != nullptr)
     surf_action_->cancel();
+  state_ = SIMIX_CANCELED;
 }
 
 // boost::intrusive_ptr<Activity> support:
 }
 
 // boost::intrusive_ptr<Activity> support:
index af4a2b5..407d18a 100644 (file)
@@ -217,11 +217,12 @@ void ActorImpl::exit()
         waiting_synchro->simcalls_.remove(&simcall);
     } else if (sleep != nullptr) {
       sleep->cancel();
         waiting_synchro->simcalls_.remove(&simcall);
     } else if (sleep != nullptr) {
       sleep->cancel();
-      sleep->post();
+      sleep->finish();
     } else if (raw != nullptr) {
       raw->finish();
     } else if (io != nullptr) {
       io->cancel();
     } else if (raw != nullptr) {
       raw->finish();
     } else if (io != nullptr) {
       io->cancel();
+      io->finish();
     } else {
       simgrid::kernel::activity::ActivityImplPtr activity = waiting_synchro;
       xbt_die("Activity is of unknown type %s", simgrid::xbt::demangle(typeid(activity).name()).get());
     } else {
       simgrid::kernel::activity::ActivityImplPtr activity = waiting_synchro;
       xbt_die("Activity is of unknown type %s", simgrid::xbt::demangle(typeid(activity).name()).get());