lam_event_lock needs to be held during main loop
This commit was SVN r852.
Этот коммит содержится в:
родитель
5b59e1fee4
Коммит
76c523c3b0
@ -224,6 +224,8 @@ lam_event_loop(int flags)
|
|||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
int res, done;
|
int res, done;
|
||||||
|
|
||||||
|
lam_mutex_lock(&lam_event_lock);
|
||||||
|
|
||||||
/* Calculate the initial events that we are waiting for */
|
/* Calculate the initial events that we are waiting for */
|
||||||
if (lam_evsel->recalc(lam_evbase, 0) == -1) {
|
if (lam_evsel->recalc(lam_evbase, 0) == -1) {
|
||||||
lam_output(0, "lam_event_loop: lam_evsel->recalc() failed.");
|
lam_output(0, "lam_event_loop: lam_evsel->recalc() failed.");
|
||||||
@ -282,6 +284,7 @@ lam_event_loop(int flags)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lam_mutex_unlock(&lam_event_lock);
|
||||||
lam_output(0, "lam_event_loop: done");
|
lam_output(0, "lam_event_loop: done");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user