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)
|
||||
#endif
|
||||
|
||||
#if OMPI_ENABLE_DEBUG
|
||||
#include <sched.h>
|
||||
#define SPIN sched_yield()
|
||||
#else
|
||||
#define SPIN continue
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
# include <sched.h>
|
||||
# define SPIN sched_yield()
|
||||
#elif __WINDOWS__
|
||||
# define SPIN SwitchToThread()
|
||||
#else /* no switch available */
|
||||
# define SPIN
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -722,9 +722,7 @@ static int bootstrap_comm(ompi_communicator_t *comm)
|
||||
|
||||
else {
|
||||
opal_atomic_unlock(&bshe->super.seg_lock);
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
sched_yield();
|
||||
#endif
|
||||
SPIN;
|
||||
opal_atomic_lock(&bshe->super.seg_lock);
|
||||
}
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user