A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code simplification
[simgrid.git]
/
src
/
kernel
/
activity
/
CommImpl.cpp
diff --git
a/src/kernel/activity/CommImpl.cpp
b/src/kernel/activity/CommImpl.cpp
index
58182ea
..
c5b8e12
100644
(file)
--- a/
src/kernel/activity/CommImpl.cpp
+++ b/
src/kernel/activity/CommImpl.cpp
@@
-6,8
+6,8
@@
#include "src/kernel/activity/CommImpl.hpp"
#include "simgrid/modelchecker.h"
#include "src/kernel/activity/CommImpl.hpp"
#include "simgrid/modelchecker.h"
-#include "src/mc/mc_replay.h"
-#include "src/simix/smx_network_private.h"
+#include "src/mc/mc_replay.h
pp
"
+#include "src/simix/smx_network_private.h
pp
"
#include "src/surf/surf_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_network);
#include "src/surf/surf_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_network);
@@
-17,7
+17,6
@@
simgrid::kernel::activity::CommImpl::CommImpl(e_smx_comm_type_t _type) : type(_t
state = SIMIX_WAITING;
src_data = nullptr;
dst_data = nullptr;
state = SIMIX_WAITING;
src_data = nullptr;
dst_data = nullptr;
- intrusive_ptr_add_ref(this);
XBT_DEBUG("Create comm activity %p", this);
}
XBT_DEBUG("Create comm activity %p", this);
}
@@
-62,7
+61,6
@@
void simgrid::kernel::activity::CommImpl::cancel()
if (state == SIMIX_WAITING) {
mbox->remove(this);
state = SIMIX_CANCELED;
if (state == SIMIX_WAITING) {
mbox->remove(this);
state = SIMIX_CANCELED;
- SIMIX_comm_unref(this);
} else if (not MC_is_active() /* when running the MC there are no surf actions */
&& not MC_record_replay_is_active() && (state == SIMIX_READY || state == SIMIX_RUNNING)) {
} else if (not MC_is_active() /* when running the MC there are no surf actions */
&& not MC_record_replay_is_active() && (state == SIMIX_READY || state == SIMIX_RUNNING)) {
@@
-73,11
+71,7
@@
void simgrid::kernel::activity::CommImpl::cancel()
/** @brief get the amount remaining from the communication */
double simgrid::kernel::activity::CommImpl::remains()
{
/** @brief get the amount remaining from the communication */
double simgrid::kernel::activity::CommImpl::remains()
{
- if (state == SIMIX_RUNNING)
- return surf_comm->getRemains();
-
- /* FIXME: check what should be returned in the other cases */
- return 0;
+ return surf_comm->getRemains();
}
/** @brief This is part of the cleanup process, probably an internal command */
}
/** @brief This is part of the cleanup process, probably an internal command */
@@
-124,6
+118,5
@@
void simgrid::kernel::activity::CommImpl::post()
/* if there are simcalls associated with the synchro, then answer them */
if (not simcalls.empty()) {
SIMIX_comm_finish(this);
/* if there are simcalls associated with the synchro, then answer them */
if (not simcalls.empty()) {
SIMIX_comm_finish(this);
- SIMIX_comm_unref(this);
}
}
}
}