Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
-Add smx_ctx_sysv_get_thread_id to the parallel ucontext factory.
[simgrid.git] / include / simix / context.h
index 7775c66..9d8ea2e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "xbt/swag.h"
 #include "simix/datatypes.h"
+#include "gras_config.h"
 
 SG_BEGIN_DECL()
 /******************************** Context *************************************/
@@ -58,7 +59,12 @@ typedef void (*smx_ctx_factory_initializer_t)(smx_context_factory_t*);
 extern smx_ctx_factory_initializer_t smx_factory_initializer_to_use;
 extern char* smx_context_factory_name;
 extern int smx_context_stack_size;
+
+#ifdef CONTEXT_THREADS
+extern __thread smx_context_t smx_current_context;
+#else
 extern smx_context_t smx_current_context;
+#endif
 
 /* *********************** */
 /* Context type definition */