From 4436adf7710dc39c6555fcd87701db50c654bf71 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Sat, 25 Jul 2015 11:02:26 +0200 Subject: [PATCH 1/1] [mc] Move MC_random is mc_base.cpp --- src/mc/mc_base.cpp | 9 +++++++++ src/mc/mc_client_api.cpp | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index c0f9ab9f14..521b96a08a 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -30,6 +30,15 @@ extern "C" { XBT_LOG_NEW_CATEGORY(mc, "All MC categories"); +int MC_random(int min, int max) +{ + xbt_assert(mc_mode != MC_MODE_SERVER); + /* TODO, if the MC is disabled we do not really need to make a simcall for + * this :) */ + /* FIXME: return mc_current_state->executed_transition->random.value; */ + return simcall_mc_random(min, max); +} + void MC_wait_for_requests(void) { #ifdef HAVE_MC diff --git a/src/mc/mc_client_api.cpp b/src/mc/mc_client_api.cpp index bdc12a2150..372f3c4082 100644 --- a/src/mc/mc_client_api.cpp +++ b/src/mc/mc_client_api.cpp @@ -30,14 +30,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client_api, mc, } -int MC_random(int min, int max) -{ - xbt_assert(mc_mode != MC_MODE_SERVER); - /* TODO, if the MC is disabled we do not really need to make a simcall for - * this :) */ - /* FIXME: return mc_current_state->executed_transition->random.value; */ - return simcall_mc_random(min, max); -} +// MC_random() is in mc_base.cpp void MC_assert(int prop) { -- 2.20.1