* I'm sure any decent optimizing compiler would have figured this one out,
but there's no point in having the call_yield check performed if we don't have sched_yield to call in the first place. This commit was SVN r6823.
Этот коммит содержится в:
родитель
aab684f159
Коммит
a926a9b4fb
@ -231,17 +231,17 @@ opal_progress(void)
|
|||||||
opal_atomic_unlock(&progress_lock);
|
opal_atomic_unlock(&progress_lock);
|
||||||
#endif /* OMPI_HAVE_THREAD_SUPPORT */
|
#endif /* OMPI_HAVE_THREAD_SUPPORT */
|
||||||
|
|
||||||
|
#if !defined(WIN32) && defined(HAVE_SCHED_YIELD)
|
||||||
if (call_yield && events <= 0) {
|
if (call_yield && events <= 0) {
|
||||||
/* If there is nothing to do - yield the processor - otherwise
|
/* If there is nothing to do - yield the processor - otherwise
|
||||||
* we could consume the processor for the entire time slice. If
|
* we could consume the processor for the entire time slice. If
|
||||||
* the processor is oversubscribed - this will result in a best-case
|
* the processor is oversubscribed - this will result in a best-case
|
||||||
* latency equivalent to the time-slice.
|
* latency equivalent to the time-slice.
|
||||||
*/
|
*/
|
||||||
#if !defined(WIN32) && defined(HAVE_SCHED_YIELD)
|
|
||||||
/* TODO: Find the windows equivalent for this */
|
/* TODO: Find the windows equivalent for this */
|
||||||
sched_yield();
|
sched_yield();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user