diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-04-23 18:26:48 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-04-23 18:26:48 +0000 |
commit | 76031df4a4a156b7a6a9723b108bfdb37521ef7c (patch) | |
tree | 6c52c49bca198ab175b88fe67b9e84658bcd5e4e /src/pulsecore/thread-mq.h | |
parent | a197644ea2cac5e35f2ca6d3d2af149ebedc13ba (diff) |
Big pile of interdependant changes:
* Fix a deadlock when an asyncq overflows and an RT thread needed to wait until space became available again while the main thread was waiting for a operation to complete and thus didn't free any new items. Now, if the asyncq overflows, queue those items temporarily, and return immediately. Then, when the queue becomes writable again, flush it.
* Modify pa_thread_mq_init() to also set up pa_rtpoll events properly for the MQ
* Some more pa_bool_t'ization
* Unify more common code between alsa-sink and alsa-source
* The upper limit for the tsched watermark is max_use minus one frame
* make module-alsa-source work
* make the alsa modules use pa_alsa_build_pollfd() now
* fix detection of dB scale for alsa-source
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2308 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/thread-mq.h')
-rw-r--r-- | src/pulsecore/thread-mq.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/thread-mq.h b/src/pulsecore/thread-mq.h index 13b6e01f..0ae49f8c 100644 --- a/src/pulsecore/thread-mq.h +++ b/src/pulsecore/thread-mq.h @@ -26,6 +26,7 @@ #include <pulse/mainloop-api.h> #include <pulsecore/asyncmsgq.h> +#include <pulsecore/rtpoll.h> /* Two way communication between a thread and a mainloop. Before the * thread is started a pa_pthread_mq should be initialized and than @@ -34,10 +35,10 @@ typedef struct pa_thread_mq { pa_mainloop_api *mainloop; pa_asyncmsgq *inq, *outq; - pa_io_event *io_event; + pa_io_event *read_event, *write_event; } pa_thread_mq; -void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop); +void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop, pa_rtpoll *rtpoll); void pa_thread_mq_done(pa_thread_mq *q); /* Install the specified pa_thread_mq object for the current thread */ |