Thanks to Gleb now we are able to call the schduler on Windows. Instead of using
sched_yield, we use our friend SwitchToThread. This commit was SVN r9671.
Этот коммит содержится в:
родитель
88037b456e
Коммит
29219ee57d
@ -39,14 +39,15 @@
|
|||||||
#define D(foo)
|
#define D(foo)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OMPI_ENABLE_DEBUG
|
#ifdef HAVE_SCHED_YIELD
|
||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
# define SPIN sched_yield()
|
# define SPIN sched_yield()
|
||||||
#else
|
#elif __WINDOWS__
|
||||||
#define SPIN continue
|
# define SPIN SwitchToThread()
|
||||||
|
#else /* no switch available */
|
||||||
|
# define SPIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -722,9 +722,7 @@ static int bootstrap_comm(ompi_communicator_t *comm)
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
opal_atomic_unlock(&bshe->super.seg_lock);
|
opal_atomic_unlock(&bshe->super.seg_lock);
|
||||||
#ifdef HAVE_SCHED_YIELD
|
SPIN;
|
||||||
sched_yield();
|
|
||||||
#endif
|
|
||||||
opal_atomic_lock(&bshe->super.seg_lock);
|
opal_atomic_lock(&bshe->super.seg_lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user