1
1

* If the event library is going to be a noop (really, this only happens on

Red Storm), don't bother doing all the book keeping work to do calls
  into the event library

This commit was SVN r6829.
Этот коммит содержится в:
Brian Barrett 2005-08-12 16:21:17 +00:00
родитель a211427eaa
Коммит ad383f5fcd
3 изменённых файлов: 19 добавлений и 25 удалений

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

@ -68,37 +68,22 @@
#if defined(HAVE_SELECT) && HAVE_SELECT
extern const struct opal_eventop opal_selectops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#if defined(HAVE_POLL) && HAVE_POLL && HAVE_WORKING_POLL
extern const struct opal_eventop opal_pollops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#if defined(HAVE_RTSIG) && HAVE_RTSIG
extern const struct opal_eventop opal_rtsigops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#if defined(HAVE_EPOLL) && HAVE_EPOLL
extern const struct opal_eventop opal_epollops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#if defined(HAVE_WORKING_KQUEUE) && HAVE_WORKING_KQUEUE
extern const struct opal_eventop opal_kqops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#if 0
@ -108,15 +93,8 @@ extern const struct opal_eventop opal_kqops;
this to work */
#if defined(WIN32) && WIN32
extern const struct opal_eventop opal_win32ops;
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 1
#endif
#endif
#endif
#ifndef OPAL_HAVE_WORKING_EVENTOPS
#define OPAL_HAVE_WORKING_EVENTOPS 0
#endif
/* In order of preference */
static const struct opal_eventop *opal_eventops[] = {

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

@ -284,4 +284,20 @@ opal_event_pending(struct opal_event *ev, short event, struct timeval *tv)
}
#endif
/* #defines to allow callers to know if opal_event_loop is going to do anything */
#if defined(HAVE_SELECT) && HAVE_SELECT
#define OPAL_HAVE_WORKING_EVENTOPS 1
#elif defined(HAVE_POLL) && HAVE_POLL && HAVE_WORKING_POLL
#define OPAL_HAVE_WORKING_EVENTOPS 1
#elif defined(HAVE_RTSIG) && HAVE_RTSIG
#define OPAL_HAVE_WORKING_EVENTOPS 1
#elif defined(HAVE_EPOLL) && HAVE_EPOLL
#define OPAL_HAVE_WORKING_EVENTOPS 1
#elif defined(HAVE_WORKING_KQUEUE) && HAVE_WORKING_KQUEUE
#define OPAL_HAVE_WORKING_EVENTOPS 1
#else
#define OPAL_HAVE_WORKING_EVENTOPS 0
#endif
#endif /* _EVENT_H_ */

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

@ -179,7 +179,7 @@ opal_progress_events(int flag)
* This is only losely tracked, as an error return can cause the number
* of progressed events to appear lower than it actually is. We don't
* care, as the cost of that happening is far outweighed by the cost
* of the if checks (they were resulting in bad pipe stalling behabior)
* of the if checks (they were resulting in bad pipe stalling behavior)
*/
void
opal_progress(void)
@ -187,7 +187,7 @@ opal_progress(void)
size_t i;
int events = 0;
#if OMPI_ENABLE_PROGRESS_THREADS == 0
#if (OMPI_ENABLE_PROGRESS_THREADS == 0) && OPAL_HAVE_WORKING_EVENTOPS
/* trip the event library if we've reached our tick rate and we are
enabled */
if (OPAL_THREAD_ADD32(&event_progress_counter, -1) <= 0 &&
@ -203,7 +203,7 @@ opal_progress(void)
}
#endif /* OMPI_HAVE_THREAD_SUPPORT */
}
#endif /* OMPI_ENABLE_PROGRESS_THREADS == 0 */
#endif /* OMPI_ENABLE_PROGRESS_THREADS == 0 && OPAL_HAVE_WORKING_EVENTOPS */
/* progress all registered callbacks */
for (i = 0 ; i < callbacks_len ; ++i) {