X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb7d4e63080036add634b3dda3348fc0c924576b..ca1146e64d38ec9ac89fb96d6a034a3617647529:/src/xbt/parmap.cpp diff --git a/src/xbt/parmap.cpp b/src/xbt/parmap.cpp index 6bf951beba..d3edb7b061 100644 --- a/src/xbt/parmap.cpp +++ b/src/xbt/parmap.cpp @@ -6,7 +6,7 @@ #include -#include "internal_config.h" +#include "src/internal_config.h" #ifdef HAVE_UNISTD_H #include #endif @@ -26,7 +26,8 @@ #include "xbt/dynar.h" #include "xbt/xbt_os_thread.h" #include "xbt/sysdep.h" -#include "simix/smx_private.h" +#include "src/simix/smx_private.h" +#include "src/simix/smx_private.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_parmap, xbt, "parmap: parallel map"); @@ -53,10 +54,12 @@ static void futex_wait(unsigned *uaddr, unsigned val); static void futex_wake(unsigned *uaddr, unsigned val); #endif +#ifndef _MSC_VER static void xbt_parmap_busy_master_wait(xbt_parmap_t parmap); static void xbt_parmap_busy_worker_signal(xbt_parmap_t parmap); static void xbt_parmap_busy_master_signal(xbt_parmap_t parmap); static void xbt_parmap_busy_worker_wait(xbt_parmap_t parmap, unsigned round); +#endif #ifdef HAVE_MC static void xbt_parmap_mc_work(xbt_parmap_t parmap, int worker_id); @@ -262,6 +265,7 @@ static void xbt_parmap_set_mode(xbt_parmap_t parmap, e_xbt_parmap_mode_t mode) #endif case XBT_PARMAP_BUSY_WAIT: +#ifndef _MSC_VER parmap->master_wait_f = xbt_parmap_busy_master_wait; parmap->worker_signal_f = xbt_parmap_busy_worker_signal; parmap->master_signal_f = xbt_parmap_busy_master_signal; @@ -272,6 +276,9 @@ static void xbt_parmap_set_mode(xbt_parmap_t parmap, e_xbt_parmap_mode_t mode) xbt_os_cond_destroy(parmap->done_cond); xbt_os_mutex_destroy(parmap->done_mutex); break; +#else + xbt_die("Busy waiting not implemented on Windows yet."); +#endif case XBT_PARMAP_DEFAULT: THROW_IMPOSSIBLE; @@ -593,6 +600,7 @@ static void xbt_parmap_futex_worker_wait(xbt_parmap_t parmap, unsigned round) } #endif +#ifndef _MSC_VER /** * \brief Starts the parmap: waits for all workers to be ready and returns. * @@ -648,3 +656,4 @@ static void xbt_parmap_busy_worker_wait(xbt_parmap_t parmap, unsigned round) xbt_os_thread_yield(); } } +#endif /* ! _MSC_VER */