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
Make SimcallInspector::dot_label and to_string pure virtual again.
[simgrid.git]
/
src
/
simix
/
libsmx.cpp
diff --git
a/src/simix/libsmx.cpp
b/src/simix/libsmx.cpp
index 9e05fbf4f18209393ef517490752b55280185bb8..a9a37c0798a93b46896dc3a7c6ac7514322b8929 100644
(file)
--- a/
src/simix/libsmx.cpp
+++ b/
src/simix/libsmx.cpp
@@
-355,21
+355,19
@@
void simcall_run_kernel(std::function<void()> const& code, simgrid::mc::SimcallI
{
simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = t;
simcall_BODY_run_kernel(&code);
+ simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = nullptr;
}
void simcall_run_blocking(std::function<void()> const& code, simgrid::mc::SimcallInspector* t = nullptr)
{
simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = t;
simcall_BODY_run_blocking(&code);
+ simgrid::kernel::actor::ActorImpl::self()->simcall_.inspector_ = nullptr;
}
-int simcall_mc_random(int min, int max) {
- if (not MC_is_active() && not MC_record_replay_is_active()) { // no need to do a simcall in this case
- static simgrid::xbt::random::XbtRandom prng;
- return prng.uniform_int(min, max);
- }
- auto observer = new simgrid::mc::RandomSimcall(SIMIX_process_self(), min, max);
- return simgrid::kernel::actor::simcall([observer] { return observer->get_value(); }, observer);
+int simcall_mc_random(int min, int max) // XBT_ATTRIB_DEPRECATD_v331
+{
+ return MC_random(min, max);
}
/* ************************************************************************** */