A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sthread_inside_simgrid static into libsthread in the (vain) hope that it'll...
[simgrid.git]
/
src
/
xbt
/
xbt_main.cpp
diff --git
a/src/xbt/xbt_main.cpp
b/src/xbt/xbt_main.cpp
index
f452565
..
9443d05
100644
(file)
--- 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<std::string> cmdline; /* all we got in argv */
} // namespace simgrid::xbt
std::vector<std::string> 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<bool> cfg_dbg_clean_atexit{
int xbt_initialized = 0;
simgrid::config::Flag<bool> cfg_dbg_clean_atexit{
@@
-57,6
+56,8
@@
int xbt_pagebits = 0;
*/
static void xbt_preinit() XBT_ATTRIB_CONSTRUCTOR(200);
static void xbt_postexit();
*/
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 <windows.h>
#ifdef _WIN32
#include <windows.h>
@@
-82,7
+83,6
@@
static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserv
static void xbt_preinit()
{
static void xbt_preinit()
{
- sthread_inside_simgrid = 1;
#ifdef _WIN32
SYSTEM_INFO si;
GetSystemInfo(&si);
#ifdef _WIN32
SYSTEM_INFO si;
GetSystemInfo(&si);
@@
-102,7
+102,6
@@
static void xbt_preinit()
xbt_log_preinit();
xbt_dict_preinit();
atexit(xbt_postexit);
xbt_log_preinit();
xbt_dict_preinit();
atexit(xbt_postexit);
- sthread_inside_simgrid = 0;
}
static void xbt_postexit()
}
static void xbt_postexit()