1
1

Update libevent 2021 component so it also only warns once when detecting reentrant behavior

This commit was SVN r28721.
Этот коммит содержится в:
Ralph Castain 2013-07-04 04:41:04 +00:00
родитель 62378209f0
Коммит 21c8041a40

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

@ -1550,6 +1550,10 @@ event_loop(int flags)
return event_base_loop(current_base, flags);
}
/********* OMPI CHANGE **********/
static int warn_once = 0;
/*********/
int
event_base_loop(struct event_base *base, int flags)
{
@ -1562,10 +1566,13 @@ event_base_loop(struct event_base *base, int flags)
* as we invoke user callbacks. */
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
if (base->running_loop) {
if (base->running_loop && 0 == warn_once) {
event_warnx("%s: reentrant invocation. Only one event_base_loop"
" can run on each event_base at once.", __func__);
EVBASE_RELEASE_LOCK(base, th_base_lock);
/********* OMPI CHANGE **********/
warn_once = 1;
/*********/
EVBASE_RELEASE_LOCK(base, th_base_lock);
return -1;
}