Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make sthread work out of MC build trees
[simgrid.git] / src / xbt / xbt_main.cpp
index 1dc8020..6086dad 100644 (file)
@@ -10,6 +10,7 @@
 #include "simgrid/config.h"
 #include "simgrid/sg_config.hpp"
 #include "src/internal_config.h"
+#include "src/sthread/sthread.h" // sthread_inside_simgrid
 #include "xbt/config.hpp"
 #include "xbt/coverage.h"
 #include "xbt/dynar.h"
@@ -40,6 +41,8 @@ std::string binary_name;          /* Name of the system process containing us (m
 std::vector<std::string> cmdline; /* all we got in argv */
 } // namespace simgrid::xbt
 
+volatile int sthread_inside_simgrid = 1; // Only intercept pthread calls in user code.
+
 int xbt_initialized = 0;
 simgrid::config::Flag<bool> cfg_dbg_clean_atexit{
     "debug/clean-atexit",