summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/asyncmsgq.c6
-rw-r--r--src/pulsecore/asyncmsgq.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c
index 36721406..b0804f79 100644
--- a/src/pulsecore/asyncmsgq.c
+++ b/src/pulsecore/asyncmsgq.c
@@ -351,3 +351,9 @@ void pa_asyncmsgq_flush(pa_asyncmsgq *a, pa_bool_t run) {
pa_asyncmsgq_unref(a);
}
}
+
+pa_bool_t pa_asyncmsgq_dispatching(pa_asyncmsgq *a) {
+ pa_assert(PA_REFCNT_VALUE(a) > 0);
+
+ return !!a->current;
+}
diff --git a/src/pulsecore/asyncmsgq.h b/src/pulsecore/asyncmsgq.h
index 26f528f6..1085c2f0 100644
--- a/src/pulsecore/asyncmsgq.h
+++ b/src/pulsecore/asyncmsgq.h
@@ -78,4 +78,6 @@ int pa_asyncmsgq_write_fd(pa_asyncmsgq *q);
void pa_asyncmsgq_write_before_poll(pa_asyncmsgq *a);
void pa_asyncmsgq_write_after_poll(pa_asyncmsgq *a);
+pa_bool_t pa_asyncmsgq_dispatching(pa_asyncmsgq *a);
+
#endif