X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4be5a419ec94da00473952d816919782ffa260f0..a718b062e3373ae631ca7bbffe798c413ade738a:/src/kernel/activity/SynchroComm.cpp?ds=sidebyside diff --git a/src/kernel/activity/SynchroComm.cpp b/src/kernel/activity/SynchroComm.cpp index 532c591768..f8969b7c98 100644 --- a/src/kernel/activity/SynchroComm.cpp +++ b/src/kernel/activity/SynchroComm.cpp @@ -35,8 +35,7 @@ simgrid::kernel::activity::Comm::~Comm() } if(mbox) - SIMIX_mbox_remove(mbox, this); - + mbox->remove(this); } void simgrid::kernel::activity::Comm::suspend() { @@ -60,7 +59,7 @@ void simgrid::kernel::activity::Comm::cancel() /* if the synchro is a waiting state means that it is still in a mbox */ /* so remove from it and delete it */ if (state == SIMIX_WAITING) { - SIMIX_mbox_remove(mbox, this); + mbox->remove(this); state = SIMIX_CANCELED; } else if (!MC_is_active() /* when running the MC there are no surf actions */ @@ -74,14 +73,11 @@ void simgrid::kernel::activity::Comm::cancel() /** @brief get the amount remaining from the communication */ double simgrid::kernel::activity::Comm::remains() { - switch (state) { - - case SIMIX_RUNNING: + if (state == SIMIX_RUNNING) return surf_comm->getRemains(); - default: - return 0; /*FIXME: check what should be returned */ - } + /* FIXME: check what should be returned in the other cases */ + return 0; } /** @brief This is part of the cleanup process, probably an internal command */