/* */
/* This is somehow the "libc" of SimGrid */
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2021. 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/IoImpl.hpp"
#include "src/kernel/activity/MailboxImpl.hpp"
#include "src/kernel/activity/MutexImpl.hpp"
+#include "src/mc/checker/SimcallInspector.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
+#include "xbt/random.hpp"
#include "popping_bodies.cpp"
{
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) {
- return simcall_BODY_mc_random(min, max);
+int simcall_mc_random(int min, int max) // XBT_ATTRIB_DEPRECATD_v331
+{
+ return MC_random(min, max);
}
/* ************************************************************************** */
/** @brief returns a printable string representing a simcall */
-const char *SIMIX_simcall_name(e_smx_simcall_t kind) {
- return simcall_names[kind];
+const char* SIMIX_simcall_name(Simcall kind)
+{
+ return simcall_names[static_cast<int>(kind)];
}
namespace simgrid {