1
1

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.
Этот коммит содержится в:
George Bosilca 2006-04-20 19:56:50 +00:00
родитель 88037b456e
Коммит 29219ee57d
2 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -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);
}
}