Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure libsimgrid depend on libpthreads only when needed (ie, when we use pthreads...
[simgrid.git] / src / xbt / context.c
index 4f6907b..deb917c 100644 (file)
 #include "xbt/dynar.h"
 #include "xbt/xbt_thread.h"
 
+#ifdef CONTEXT_THREADS
+ /* This file (context.c) is only loaded in libsimgrid, not libgras.
+  * xbt_thread is only loaded in libgras explicitly, and we need it in 
+  *    libsimgrid, but only when it is the backend used to implement the 
+  *    xbt_context. So, do load it on need.
+  */
+#include "xbt/xbt_thread.c"
+#endif
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_ctx, xbt, "Context");
 
 #define VOIRP(expr) DEBUG1("  {" #expr " = %p }", expr)