summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@digia.com>2012-04-02 15:01:05 +0300
committerTanu Kaskinen <tanuk@iki.fi>2012-11-15 17:57:51 +0200
commit872f56dc7ec43cb1511ef0d25c1736a373b3c2e2 (patch)
treea6b31d3a41267f6a355a5ca50220518b36668516
parent58de999a310757d69801d5e53dbce824dc961404 (diff)
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.
-rw-r--r--src/pulse/mainloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 179465a3..aec082c0 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -772,7 +772,7 @@ void pa_mainloop_wakeup(pa_mainloop *m) {
char c = 'W';
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_atomic_store(&m->wakeup_requested, TRUE);
}