Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
- Add SIMIX_context_get_thread_id to the context factory interface.
[simgrid.git] / src / simix / smx_context_base.c
index bf79ab2..5403bd8 100644 (file)
@@ -8,11 +8,11 @@
 
 
 #include "xbt/function_types.h"
-#include "smx_context_private.h"
+#include "simix/context.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(bindings);
 
-void smx_ctx_base_factory_init(smx_context_factory_t * factory)
+void smx_ctx_base_factory_init(smx_context_factory_t *factory)
 {
   /* instantiate the context factory */
   *factory = xbt_new0(s_smx_context_factory_t, 1);
@@ -25,6 +25,7 @@ void smx_ctx_base_factory_init(smx_context_factory_t * factory)
   (*factory)->runall = NULL;
   (*factory)->self = smx_ctx_base_self;
   (*factory)->get_data = smx_ctx_base_get_data;
+  (*factory)->get_thread_id = smx_ctx_base_get_thread_id;
 
   (*factory)->name = "base context factory";
 }
@@ -95,4 +96,9 @@ smx_context_t smx_ctx_base_self(void)
 void *smx_ctx_base_get_data(smx_context_t context)
 {
   return context->data;
-}
\ No newline at end of file
+}
+
+int smx_ctx_base_get_thread_id()
+{
+  return 0;
+}