mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
mainloop: Don't care about the mainloop state variable when waking up the mainloop.
If the mainloop is just about to enter polling, but m->state is not POLLING yet when some other thread calls pa_mainloop_wakeup(), the mainloop will not be woken up. It's safe to write to the wakeup pipe at any time, so let's just remove the check.
This commit is contained in:
parent
58de999a31
commit
872f56dc7e
1 changed files with 1 additions and 1 deletions
|
|
@ -772,7 +772,7 @@ void pa_mainloop_wakeup(pa_mainloop *m) {
|
||||||
char c = 'W';
|
char c = 'W';
|
||||||
pa_assert(m);
|
pa_assert(m);
|
||||||
|
|
||||||
if (m->wakeup_pipe[1] >= 0 && m->state == STATE_POLLING) {
|
if (m->wakeup_pipe[1] >= 0) {
|
||||||
pa_write(m->wakeup_pipe[1], &c, sizeof(c), &m->wakeup_pipe_type);
|
pa_write(m->wakeup_pipe[1], &c, sizeof(c), &m->wakeup_pipe_type);
|
||||||
pa_atomic_store(&m->wakeup_requested, TRUE);
|
pa_atomic_store(&m->wakeup_requested, TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue