/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simix/private.h"
+#include "smx_private.h"
#include "xbt/parmap.h"
#ifdef HAVE_VALGRIND_VALGRIND_H
static unsigned long raw_process_index = 0; /* index of the next process to run in the
* list of runnable processes */
-smx_ctx_raw_t raw_maestro_context;
+static smx_ctx_raw_t raw_maestro_context;
extern raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
rawctx_entry_point_t entry_point, void* arg);
);
#elif PROCESSOR_x86_64
__asm__ (
-#if defined(APPLE) || defined(_WIN32)
+#if defined(APPLE)
".text\n"
".globl _raw_makecontext\n"
"_raw_makecontext:\n"
+#elif defined(_WIN32)
+ ".text\n"
+ ".globl raw_makecontext\n"
+ "raw_makecontext:\n"
#else
".text\n"
".globl raw_makecontext\n"
);
__asm__ (
-#if defined(APPLE) || defined(_WIN32)
+#if defined(APPLE)
".text\n"
".globl _raw_swapcontext\n"
"_raw_swapcontext:\n"
+#elif defined(_WIN32)
+ ".text\n"
+ ".globl raw_swapcontext\n"
+ "raw_swapcontext:\n"
#else
".text\n"
".globl raw_swapcontext\n"
);
#else
-/* If you implement raw contextes for other processors, don't forget to
+/* If you implement raw contexts for other processors, don't forget to
update the definition of HAVE_RAWCTX in buildtools/Cmake/CompleteInFiles.cmake */
raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
if (SIMIX_context_is_parallel()) {
#ifdef CONTEXT_THREADS
int nthreads = SIMIX_context_get_nthreads();
- raw_parmap = xbt_parmap_new(nthreads);
+ raw_parmap = xbt_parmap_new(nthreads, SIMIX_context_get_parallel_mode());
raw_workers_stacks = xbt_new(raw_stack_t, nthreads);
xbt_os_thread_key_create(&raw_worker_id_key);
#endif
*/
static void smx_ctx_raw_free(smx_context_t context)
{
-
if (context) {
#ifdef HAVE_VALGRIND_VALGRIND_H