X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/81f4360c0a86e8f2a136e7baf9e392baac7e7d16..6b9e565aa02922f38f81c9c48c4161962170a241:/src/xbt/xbt_main.cpp diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index f45256509c..15a5959565 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -41,7 +41,6 @@ std::string binary_name; /* Name of the system process containing us (m std::vector cmdline; /* all we got in argv */ } // namespace simgrid::xbt -int sthread_inside_simgrid = 0; // whether sthread should leave pthread operations or intercept them. int xbt_initialized = 0; simgrid::config::Flag cfg_dbg_clean_atexit{ @@ -57,6 +56,12 @@ int xbt_pagebits = 0; */ static void xbt_preinit() XBT_ATTRIB_CONSTRUCTOR(200); static void xbt_postexit(); +void sthread_enable() +{ // These symbols are used from ContextSwapped in any case, but they are only useful +} +void sthread_disable() +{ // when libsthread is LD_PRELOADED. In this case, sthread's implem gets used instead. +} #ifdef _WIN32 #include @@ -82,7 +87,6 @@ static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserv static void xbt_preinit() { - sthread_inside_simgrid = 1; #ifdef _WIN32 SYSTEM_INFO si; GetSystemInfo(&si); @@ -102,7 +106,6 @@ static void xbt_preinit() xbt_log_preinit(); xbt_dict_preinit(); atexit(xbt_postexit); - sthread_inside_simgrid = 0; } static void xbt_postexit() @@ -112,9 +115,6 @@ static void xbt_postexit() xbt_initialized--; xbt_dict_postexit(); xbt_log_postexit(); -#if SIMGRID_HAVE_MC - mmalloc_postexit(); -#endif } /** @brief Initialize the xbt mechanisms. */ @@ -168,4 +168,4 @@ int SMPI_is_inited() { return false; } -#endif \ No newline at end of file +#endif