Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove useless extern "C" around logging categories
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 10 Mar 2016 13:42:12 +0000 (14:42 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 11 Mar 2016 12:49:33 +0000 (13:49 +0100)
23 files changed:
src/mc/ModelChecker.cpp
src/mc/PageStore.cpp
src/mc/Process.cpp
src/mc/RegionSnapshot.cpp
src/mc/mc_base.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_client.cpp
src/mc/mc_client_api.cpp
src/mc/mc_comm_determinism.cpp
src/mc/mc_comm_pattern.cpp
src/mc/mc_compare.cpp
src/mc/mc_config.cpp
src/mc/mc_diff.cpp
src/mc/mc_global.cpp
src/mc/mc_ignore.cpp
src/mc/mc_liveness.cpp
src/mc/mc_memory.cpp
src/mc/mc_protocol.cpp
src/mc/mc_record.cpp
src/mc/mc_request.cpp
src/mc/mc_safety.cpp
src/mc/mc_state.cpp
src/mc/mc_visited.cpp

index 636f3ec..a385dfc 100644 (file)
 #include "src/mc/mc_exit.h"
 #include "src/mc/mc_liveness.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
 
-}
-
 ::simgrid::mc::ModelChecker* mc_model_checker = nullptr;
 
 using simgrid::mc::remote;
index 3289157..9b196b8 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "src/mc/mc_mmu.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_page_snapshot, mc,
                                 "Logging specific to mc_page_snapshot");
 
@@ -230,5 +228,3 @@ XBT_TEST_UNIT("base", test_mc_page_store, "Test adding/removing pages in the sto
 }
 
 #endif /* SIMGRID_TEST */
-
-}
index 5dfae37..f9099a2 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc,
                                 "MC process information");
 
-}
-
 // ***** Helper stuff
 
 namespace simgrid {
index 0c80a3b..fc74d88 100644 (file)
 #include "src/mc/ChunkedData.hpp"
 #include "src/mc/RegionSnapshot.hpp"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_RegionSnaphot, mc,
                                 "Logging specific to region snapshots");
 
-}
-
 namespace simgrid {
 namespace mc {
 
index dd609ad..f68fc96 100644 (file)
 using simgrid::mc::remote;
 #endif
 
-extern "C" {
-
 XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
 
-}
-
 int MC_random(int min, int max)
 {
   xbt_assert(mc_mode != MC_MODE_SERVER);
index 99b11bc..171db18 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
                                 "Logging specific to mc_checkpoint");
 
-}
-
 namespace simgrid {
 namespace mc {
 
index cb82224..a173b8f 100644 (file)
 #include "src/mc/mc_private.h" // MC_deadlock_check()
 #include "src/mc/mc_smx.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
 
+extern "C" {
+
 mc_client_t mc_client;
 
 void MC_client_init(void)
index 9433798..da2fece 100644 (file)
  *  communicate with the MC (declared in modelchecker.h).
  */
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client_api, mc,
   "Public API for the model-checked application");
 
-}
-
 // MC_random() is in mc_base.cpp
 
 void MC_assert(int prop)
index f1119d2..0836626 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc,
                                 "Logging specific to MC communication determinism detection");
 
+extern "C" {
+
 /********** Global variables **********/
 
 xbt_dynar_t initial_communications_pattern;
index 0a5ff5e..3c89669 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_pattern, mc,
                                 "Logging specific to MC communication patterns");
 
+extern "C" {
+
 mc_comm_pattern_t MC_comm_pattern_dup(mc_comm_pattern_t comm)
 {
   mc_comm_pattern_t res = xbt_new0(s_mc_comm_pattern_t, 1);
index 232feec..8aaaefb 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, xbt,
                                 "Logging specific to mc_compare in mc");
 
-}
-
 namespace simgrid {
 namespace mc {
 
index a0ddac8..5644684 100644 (file)
 
 #include "src/mc/mc_record.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc,
                                 "Configuration of MC");
 
-}
-
 #if HAVE_MC
 namespace simgrid {
 namespace mc {
index f7e1e8e..e877474 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt,
                                 "Logging specific to mc_diff in mc");
 
+extern "C" {
+
 /*********************************** Heap comparison ***********************************/
 /***************************************************************************************/
 
index b84e5eb..128e877 100644 (file)
 #include "src/mc/mc_protocol.h"
 #include "src/mc/mc_client.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc,
                                 "Logging specific to MC (global)");
 
-}
-
 e_mc_mode_t mc_mode;
 
 namespace simgrid {
index e04d7fc..51d781c 100644 (file)
 #include "src/mc/mc_protocol.h"
 #include "src/mc/mc_client.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ignore, mc,
                                 "Logging specific to MC ignore mechanism");
 
+extern "C" {
+
 // ***** Model-checked
 
 void MC_ignore_heap(void *address, size_t size)
index 718fe43..e57d81f 100644 (file)
 #include "src/mc/mc_safety.h"
 #include "src/mc/mc_exit.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc,
                                 "Logging specific to algorithms for liveness properties verification");
 
-}
-
 /********* Global variables *********/
 
 xbt_dynar_t acceptance_pairs;
index 5a452f6..1db534b 100644 (file)
 #include "mc/mc.h"
 #include "src/mc/mc_private.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_memory, mc,
                                 "Logging specific to MC (memory)");
 
+extern "C" {
+
 /* Initialize the model-checker memory subsystem */
 /* It creates the two heap regions: std_heap and mc_heap */
 void MC_memory_init()
index 027bdda..55ab295 100644 (file)
 #include "src/mc/mc_protocol.h"
 #include "src/mc/mc_client.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_protocol, mc, "Generic MC protocol logic");
 
+extern "C" {
+
 int MC_protocol_send(int socket, const void* message, std::size_t size)
 {
   XBT_DEBUG("Protocol [%s] send %s",
index 216356d..494f961 100644 (file)
 #include "src/mc/mc_liveness.h"
 #endif
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc,
   " Logging specific to MC record/replay facility");
 
+extern "C" {
+
 char* MC_record_path = nullptr;
 
 void MC_record_replay(mc_record_item_t start, std::size_t len)
index d6be451..9500f33 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc,
                                 "Logging specific to MC (request)");
 
-}
-
 static char *pointer_to_string(void *pointer);
 static char *buff_size_to_string(size_t size);
 
index 74fde12..98e8d4d 100644 (file)
 
 #include "src/xbt/mmalloc/mmprivate.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_safety, mc,
                                 "Logging specific to MC safety verification ");
 
-}
-
 namespace simgrid {
 namespace mc {
 
index 510a7de..741ba37 100644 (file)
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_state, mc,
                                 "Logging specific to MC (state)");
 
+extern "C" {
+
 /**
  * \brief Creates a state data structure used by the exploration algorithm
  */
index 54ea67b..e87f274 100644 (file)
 #include "src/mc/Process.hpp"
 #include "src/mc/mc_smx.h"
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_visited, mc,
                                 "Logging specific to state equaity detection mechanisms");
 
-}
-
 namespace simgrid {
 namespace mc {