-int MC_random(int min, int max)
-{
-#if SIMGRID_HAVE_MC
- xbt_assert(mc_model_checker == nullptr);
-#endif
- 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);
- }
- simgrid::kernel::actor::RandomSimcall observer{simgrid::kernel::actor::ActorImpl::self(), min, max};
- return simgrid::kernel::actor::simcall([&observer] { return observer.get_value(); }, &observer);
-}
-
-namespace simgrid {
-namespace mc {