From 5e520aa3bdba021107a2015163ea2252a4f14cd2 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 16 Jul 2017 21:32:40 +0200 Subject: [PATCH] this is a hpp header --- src/mc/VisitedState.cpp | 2 +- .../CommunicationDeterminismChecker.hpp | 5 ++-- src/mc/checker/simgrid_mc.cpp | 2 +- src/mc/mc_comm_pattern.cpp | 4 +-- ...{mc_comm_pattern.h => mc_comm_pattern.hpp} | 26 +++++++++---------- src/mc/mc_global.cpp | 10 +++---- src/mc/mc_state.cpp | 10 +++---- tools/cmake/DefinePackages.cmake | 2 +- 8 files changed, 30 insertions(+), 31 deletions(-) rename src/mc/{mc_comm_pattern.h => mc_comm_pattern.hpp} (78%) diff --git a/src/mc/VisitedState.cpp b/src/mc/VisitedState.cpp index 017e9f204b..308a5845f6 100644 --- a/src/mc/VisitedState.cpp +++ b/src/mc/VisitedState.cpp @@ -14,7 +14,7 @@ #include "xbt/sysdep.h" #include "src/mc/VisitedState.hpp" -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_private.h" #include "src/mc/mc_smx.h" #include "src/mc/remote/RemoteClient.hpp" diff --git a/src/mc/checker/CommunicationDeterminismChecker.hpp b/src/mc/checker/CommunicationDeterminismChecker.hpp index aa07b43554..951ceb43c7 100644 --- a/src/mc/checker/CommunicationDeterminismChecker.hpp +++ b/src/mc/checker/CommunicationDeterminismChecker.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2016-2017. 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. */ @@ -11,7 +10,7 @@ #include "src/mc/VisitedState.hpp" #include "src/mc/checker/Checker.hpp" -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_forward.hpp" #ifndef SIMGRID_MC_COMMUNICATION_DETERMINISM_CHECKER_HPP diff --git a/src/mc/checker/simgrid_mc.cpp b/src/mc/checker/simgrid_mc.cpp index e9af0b5894..ffcff71c46 100644 --- a/src/mc/checker/simgrid_mc.cpp +++ b/src/mc/checker/simgrid_mc.cpp @@ -22,7 +22,7 @@ #include "src/mc/Session.hpp" #include "src/mc/checker/Checker.hpp" #include "src/mc/mc_base.h" -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_exit.h" #include "src/mc/mc_private.h" #include "src/mc/mc_safety.h" diff --git a/src/mc/mc_comm_pattern.cpp b/src/mc/mc_comm_pattern.cpp index 25021c4682..3f3d1bdaa1 100644 --- a/src/mc/mc_comm_pattern.cpp +++ b/src/mc/mc_comm_pattern.cpp @@ -9,10 +9,10 @@ #include "xbt/sysdep.h" #include -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/checker/CommunicationDeterminismChecker.hpp" +#include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_smx.h" #include "src/mc/mc_xbt.hpp" -#include "src/mc/checker/CommunicationDeterminismChecker.hpp" using simgrid::mc::remote; diff --git a/src/mc/mc_comm_pattern.h b/src/mc/mc_comm_pattern.hpp similarity index 78% rename from src/mc/mc_comm_pattern.h rename to src/mc/mc_comm_pattern.hpp index b5ac8410dd..0d99b67520 100644 --- a/src/mc/mc_comm_pattern.h +++ b/src/mc/mc_comm_pattern.hpp @@ -20,7 +20,6 @@ struct PatternCommunicationList { unsigned int index_comm = 0; std::vector> list; }; - } } @@ -57,21 +56,22 @@ typedef enum { static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req) { - switch(req->call) { - case SIMCALL_COMM_ISEND: - return MC_CALL_TYPE_SEND; - case SIMCALL_COMM_IRECV: - return MC_CALL_TYPE_RECV; - case SIMCALL_COMM_WAIT: - return MC_CALL_TYPE_WAIT; - case SIMCALL_COMM_WAITANY: - return MC_CALL_TYPE_WAITANY; - default: - return MC_CALL_TYPE_NONE; + switch (req->call) { + case SIMCALL_COMM_ISEND: + return MC_CALL_TYPE_SEND; + case SIMCALL_COMM_IRECV: + return MC_CALL_TYPE_RECV; + case SIMCALL_COMM_WAIT: + return MC_CALL_TYPE_WAIT; + case SIMCALL_COMM_WAITANY: + return MC_CALL_TYPE_WAITANY; + default: + return MC_CALL_TYPE_NONE; } } -XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, xbt_dynar_t current_pattern, int backtracking); +XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, + xbt_dynar_t current_pattern, int backtracking); XBT_PRIVATE void MC_restore_communications_pattern(simgrid::mc::State* state); diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 8713d54aaa..07eeace052 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -29,15 +29,15 @@ #include "src/simix/ActorImpl.hpp" #if SIMGRID_HAVE_MC -#include -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/checker/Checker.hpp" +#include "src/mc/mc_comm_pattern.hpp" +#include "src/mc/mc_private.h" #include "src/mc/mc_request.h" #include "src/mc/mc_safety.h" +#include "src/mc/mc_smx.h" #include "src/mc/mc_snapshot.h" -#include "src/mc/mc_private.h" #include "src/mc/mc_unw.h" -#include "src/mc/mc_smx.h" -#include "src/mc/checker/Checker.hpp" +#include #endif #include "src/mc/Transition.hpp" diff --git a/src/mc/mc_state.cpp b/src/mc/mc_state.cpp index f606492d7b..f37e793654 100644 --- a/src/mc/mc_state.cpp +++ b/src/mc/mc_state.cpp @@ -10,14 +10,14 @@ #include "xbt/log.h" #include "xbt/sysdep.h" -#include "src/simix/smx_private.h" -#include "src/mc/mc_state.h" -#include "src/mc/mc_request.h" +#include "src/mc/Transition.hpp" +#include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_private.h" -#include "src/mc/mc_comm_pattern.h" +#include "src/mc/mc_request.h" #include "src/mc/mc_smx.h" +#include "src/mc/mc_state.h" #include "src/mc/mc_xbt.hpp" -#include "src/mc/Transition.hpp" +#include "src/simix/smx_private.h" using simgrid::mc::remote; diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 52445fd497..ca88375580 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -610,8 +610,8 @@ set(MC_SRC src/mc/mc_snapshot.h src/mc/mc_snapshot.cpp src/mc/mc_page_snapshot.cpp - src/mc/mc_comm_pattern.h src/mc/mc_comm_pattern.cpp + src/mc/mc_comm_pattern.hpp src/mc/compare.cpp src/mc/mc_dwarf.hpp src/mc/mc_dwarf.cpp -- 2.20.1