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