Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't destroy synchro in a simcall, this drives the JVM nuts
[simgrid.git] / src / simix / UContext.cpp
index d2ce507..5b793c5 100644 (file)
@@ -8,9 +8,11 @@
 
 #include <stdarg.h>
 
+#include <functional>
+
 #include "xbt/parmap.h"
-#include "smx_private.h"
-#include "smx_private.hpp"
+#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
 #include "src/internal_config.h"
 #include "src/context_sysv_config.h"        /* loads context system definitions */
 #include "mc/mc.h"
@@ -34,8 +36,8 @@
  * Makecontext expects integer arguments, we the context
  * variable is decomposed into a serie of integers and
  * each integer is passed as argument to makecontext. */
-XBT_PRIVATE
-void simgrid_makecontext(ucontext* ucp, void (*func)(int first, ...), void* arg)
+static
+void simgrid_makecontext(ucontext_t* ucp, void (*func)(int first, ...), void* arg)
 {
   int ctx_addr[CTX_ADDR_LEN];
   memcpy(ctx_addr, &arg, sizeof(void*));
@@ -230,7 +232,7 @@ UContext::UContext(std::function<void()> code,
 
 #ifdef HAVE_MC
   if (MC_is_active() && code) {
-    MC_register_stack_area(this->stack_, context->process,
+    MC_register_stack_area(this->stack_, process,
                       &(this->uc_), smx_context_usable_stack_size);
   }
 #endif