1
1

* Need to unlock on error conditions in opal_event_base_loop()

* Fix if structure if we don't use signals

Rainer Keller submitted original patch, slightly cleaned up by me.

This commit was SVN r11758.
Этот коммит содержится в:
Brian Barrett 2006-09-22 16:08:58 +00:00
родитель 798c19d395
Коммит b4480cf182
2 изменённых файлов: 6 добавлений и 3 удалений

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

@ -533,8 +533,10 @@ opal_event_base_loop(struct event_base *base, int flags)
done = 0;
while (!done && opal_event_enabled) {
/* Calculate the initial events that we are waiting for */
if (evsel->recalc(base, evbase, 0) == -1)
if (evsel->recalc(base, evbase, 0) == -1) {
OPAL_THREAD_UNLOCK(&opal_event_lock);
return (-1);
}
/* Terminate the loop if we have been asked to */
if (base->event_gotterm) {

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

@ -189,7 +189,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
something else. */
OPAL_THREAD_UNLOCK(&opal_event_lock);
res = poll(pop->event_set, nfds, sec);
OPAL_THREAD_LOCK(&opal_event_lock);
OPAL_THREAD_LOCK(&opal_event_lock);
#if OPAL_EVENT_USE_SIGNALS
if (opal_evsignal_recalc(&pop->evsigmask) == -1)
@ -206,8 +206,9 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
opal_evsignal_process();
#endif
return (0);
} else if (opal_evsignal_caught)
}
#if OPAL_EVENT_USE_SIGNALS
else if (opal_evsignal_caught)
opal_evsignal_process();
#endif